Problems compiling Postgis from source in Ubuntu 9.10
来源:互联网 发布:linux openssl 使用 编辑:程序博客网 时间:2024/05/22 08:18
Hi All,
- I got the following error when I ran configure:
$ sudo ./configure --with-pgsql=/usr/local/pgsql/bin/pg_config --with-geos=/usr/local/bin/geos-config --with-proj=/usr/local/ --with-proj-libdir=/usr/local/lib
configure: error: the PGXS Makefile /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mkcannotbefound.PleaseinstallthePostgreSQLserver development packages and re-runconfigure.
- I didn't see a configure option to specify a path for this, so I createdthe missing dir,and put a symbolic link in it that points back to wherepgxs.mk lives:
$ sudo ln -s /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk
- The configure passed, but I get a related error when I try torun make:
$ sudo make
<snip>
make -C postgis
make[1]: Entering directory `/usr/local/postgresql-8.4.2/contrib/postgis-1.4.1/postgis'
/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk:59: /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/../../src/Makefile.global: No such file or directory
/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk:84: /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/../../src/Makefile.shlib: No such file or directory
make[1]: *** No rule to make target `/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/../../src/Makefile.shlib'. Stop.
make[1]: Leaving directory `/usr/local/postgresql-8.4.2/contrib/postgis-1.4.1/postgis'
make: *** [postgis] Error 2
computer one in /usr/localand one in /usr, i.e. you haveinstalled one
from packages using aptitudeand compiled another one by hand. You are
also using the wrong --with arguments fromthe 1.3release that don't
work with PostGIS 1.4.
Karmic Koala already comes with PostgreSQL 8.4 so you should "make
uninstall" in your hand-compiled source tree to remove all traces of it
from /usr/local. Then install the postgresql-server-dev-8.4 packageand
re-runconfigure like this:
$ sudo ./configure --with-geosconfig=/usr/local/bin/geos-config
--with-projdir=/usr/local
I really am tempted to come up with a fix for this brain-dead piece of
Debian packaging as it seems to catch a lot of people out...
$ sudo ./configure --with-geosconfig=/usr/local/bin/geos-config --with-projdir=/usr/local --with-pgconfig=/usr/local/pgsql/bin/pg_config
Ran "make" and "make install" with no problems and everything looks good now.
That bogus pg_config was the source of my grief, so thanks again forthe help.
- I got the following error when I ran configure:
$ sudo ./configure --with-pgsql=/usr/local/pgsql/bin/pg_config --with-geos=/usr/local/bin/geos-config --with-proj=/usr/local/ --with-proj-libdir=/usr/local/lib
configure: error: the PGXS Makefile /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mkcannotbefound.PleaseinstallthePostgreSQLserver development packages and re-runconfigure.
- I didn't see a configure option to specify a path for this, so I createdthe missing dir,and put a symbolic link in it that points back to wherepgxs.mk lives:
$ sudo ln -s /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk
- The configure passed, but I get a related error when I try torun make:
$ sudo make
<snip>
make -C postgis
make[1]: Entering directory `/usr/local/postgresql-8.4.2/contrib/postgis-1.4.1/postgis'
/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk:59: /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/../../src/Makefile.global: No such file or directory
/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk:84: /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/../../src/Makefile.shlib: No such file or directory
make[1]: *** No rule to make target `/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/../../src/Makefile.shlib'. Stop.
make[1]: Leaving directory `/usr/local/postgresql-8.4.2/contrib/postgis-1.4.1/postgis'
make: *** [postgis] Error 2
- Can someone please advise me how to get past this?
Thanks,
computer one in /usr/localand one in /usr, i.e. you haveinstalled one
from packages using aptitudeand compiled another one by hand. You are
also using the wrong --with arguments fromthe 1.3release that don't
work with PostGIS 1.4.
Karmic Koala already comes with PostgreSQL 8.4 so you should "make
uninstall" in your hand-compiled source tree to remove all traces of it
from /usr/local. Then install the postgresql-server-dev-8.4 packageand
re-runconfigure like this:
$ sudo ./configure --with-geosconfig=/usr/local/bin/geos-config
--with-projdir=/usr/local
I really am tempted to come up with a fix for this brain-dead piece of
Debian packaging as it seems to catch a lot of people out...
---------------------------------解决方案--------------------------------------------
Ok, cleaned all of the Ubuntu-installed junk outandreinstalled from source into /usr/local with:
$ sudo ./configure --with-geosconfig=/usr/local/bin/geos-config --with-projdir=/usr/local --with-pgconfig=/usr/local/pgsql/bin/pg_config
Ran "make" and "make install" with no problems and everything looks good now.
That bogus pg_config was the source of my grief, so thanks again forthe help.
Roger
最后总结:重复安装后可能出现以上问题,要解决的话,要彻底删除安装的软件:
使用如下命令: sudo apt-get remove --purge 软件名
再次安装就不会有问题了,之上是指定了相应的配置文件,效果一样,推荐完全卸载。
from http://postgis.17.n6.nabble.com/Problems-compiling-Postgis-from-source-in-Ubuntu-9-10-td3568494.html
- Problems compiling Postgis from source in Ubuntu 9.10
- Compiling Programs from Source
- How to install PostGIS 2.0 on Ubuntu 11.10 (oneiric) from source
- Compiling Gummi in Ubuntu 10.04
- Compiling PHP and Apache 2 from source on Linux OS
- build ubuntu from source
- Installing from Source Under Ubuntu
- Compiling Swift source files
- Compiling GnuGk from CVS
- A number of problems from coded in ARM assembly language Problems
- add source.list in ubuntu
- Problems with Eclipse buttons in Ubuntu 9.10(Cannot create/import project)
- Installing ImageMagick from Source on Ubuntu 8.04
- ubuntu / Installing MySQL 5.6.x from source
- Compile Bitcoin Core from Source on Ubuntu
- ubuntu安装MySQL Connector/C++ from Source
- Ubuntu problems
- android kernel source code compiling
- wifi管理类
- NGUI 动态添加(改)
- 前言
- 如何实现参数个数不定的函数?
- WPF数据操作
- Problems compiling Postgis from source in Ubuntu 9.10
- Android横屏竖屏设置
- iWebOffice一些相关
- Unity3d ios设备的cache问题
- my honey in another city
- jsoup Cookbook
- Android中数据文件解析(Json解析【从服务器端获取数据并且解析,显示在客户端上面】)
- 十六周任务3
- 分布式系统编程,你到哪一级了?