我正在开发一个PostgresDB插件。 该插件正在Centos 6.3中运行在Postgres中。 为了能够编译我的项目,我不得不从epel仓库安装一些库,并从rpmforge安装一些库。 足够深的一些软件包在两个存储库中都是重复的,例如:
# yum whatprovides postgis Loaded plugins: fastestmirror, presto, priorities, refresh-packagekit Loading mirror speeds from cached hostfile * Webmin: download.webmin.com * base: mirror2.hs-esslingen.de * epel: mirror.awanti.com * extras: mirror2.hs-esslingen.de * rpmforge: mirror.nl.leaseweb.net * updates: mirror.netcologne.de postgis-1.5.3-1.el6.x86_64 : Geographic Information Systems Extensions to : PostgreSQL Repo : epel Matched from: postgis-1.3.6-1.el6.rf.x86_64 : Geographic Information Systems Extensions to : PostgreSQL Repo : rpmforge Matched from:
现在我的项目编译,但不链接缺less的引用:
/usr/pgsql-9.1/lib/postgis-1.5.so: undefined reference to `accumArrayResult' /usr/pgsql-9.1/lib/postgis-1.5.so: undefined reference to `TupleDescGetAttInMetadata' /usr/pgsql-9.1/lib/postgis-1.5.so: undefined reference to `repalloc' /usr/pgsql-9.1/lib/postgis-1.5.so: undefined reference to `SPI_exec' /usr/pgsql-9.1/lib/postgis-1.5.so: undefined reference to `init_MultiFuncCall'
这很可能意味着,一些软件包被混淆了:一些是从一个回购站安装,另一个是从另一个回收站安装。
问题:(i)如何告诉yum从一个仓库安装软件包,然后从另一个仓库重新安装(查看链接错误是否会消失); (ii)如何从一个回购库中看到系统上安装了哪些软件包?
yum list installed
将告诉你什么回购一个给定的软件包安装,例如:
bonnie++.x86_64 1.96-2.el6 @epel/6.2
要select要安装的变体,只需使用您whatprovides
列表中安装的变体的确切名称whatprovides
:
yum install postgis-1.3.6-1.el6.rf.x86_64
有关更多信息,请参阅man yum
的specify package names
部分。
要从其中安装软件包,请将/etc/yum.repos.d/epel或/etc/yum.repos.d/rpmforge文件中的软件包排除在外。
exclude = <包名>
在最后添加,你可以添加多行,如果你想。
安装的软件包应该列在/var/log/yum.log中