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

- Can someone please advise me how to get past this?

Thanks,


It looks as if you have multiple copies of PostgreSQL installed on your
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


原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 手被猫爪子破皮怎么办 去台湾用流量怎么办 上吊脖子太痛怎么办 沙发拐角有空调怎么办 报警警察不出警怎么办 驾校合同丢了怎么办 月经弄脏了床单怎么办 半夜到深圳机场怎么办 统计局来公司查怎么办 双离合严重堵车怎么办 健身俱乐部会员要退私教怎么办 感冒做剧烈运动怎么办 雪乐山滑雪怎么办卡 吉林省社保漏保怎么办 时时彩账户冻结怎么办 半夜到天津机场怎么办 小孩吃了避孕药怎么办 太阳能手表停了怎么办 太阳伞架坏了怎么办 通州自行车闪退怎么办? 台球厅生意不好怎么办 被水母咬了怎么办 被告不收判决书怎么办 律师完不成创收怎么办 保险业务员欺骗客户怎么办 德州扑克一样大怎么办 天气热没有空调怎么办 毕业证相片掉了怎么办 环世界肠道蠕虫怎么办 驾校时间过期了怎么办 过度劳累手疼怎么办 工商年检做错了怎么办 工商年检数字证书过期怎么办 工商年检过了怎么办 工商忘了年检怎么办 营业执照年检过期了怎么办 个体户营业执照没年检怎么办 工商执照没有年检怎么办 工商执照未年检怎么办 货车过期未年检怎么办 银吉姆健身卡怎么办