Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:
 * base:
 * epel:
 * extras:
 * rpmforge:
 * updates:
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/ undefined reference to `accumArrayResult'
/usr/pgsql-9.1/lib/ undefined reference to `TupleDescGetAttInMetadata'
/usr/pgsql-9.1/lib/ undefined reference to `repalloc'
/usr/pgsql-9.1/lib/ undefined reference to `SPI_exec'
/usr/pgsql-9.1/lib/ 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
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


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.