Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am developing a PostgresDB plugin. The plugin is being run in Postgres in Centos 6.3. To be able to compile my project, I had to install some of the libraries from the epel repository and some from the rpmforge. Interestengly enough some of the packages are duplicated in both repositories, e.g.,:

# 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:

Now my project compiles, but does not link with missing references:

/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'

which most probably means, that some packages got mixed up: some are install from one repo, and some from the other.

Questions: (i) how can I tell yum to install the package from one repo and then reinstall from the other (to see whether the linking errors would go away); (ii) how can I see what packages on the system are installed from one repo and what from the other?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

yum list installed will tell you from what repo a given package was installed, e.g.:

bonnie++.x86_64                     1.96-2.el6                  @epel/6.2  

To select which variant to install, just use the exact name of the variant you want to install from your whatprovides list:

yum install postgis-1.3.6-1.el6.rf.x86_64

For more info, see the specify package names section of man yum.

share|improve this answer

To install a package from one, exclude the package(s) in the /etc/yum.repos.d/epel or /etc/yum.repos.d/rpmforge files.

exclude= < packagename >

added at the end, you can add multiple lines if you want.

The packages installed should be listed in /var/log/yum.log

share|improve this answer
    
good point and a useful post –  arthur Feb 8 '13 at 10:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.