-   Linux - Software (
-   -   How do I get back packages after I excluded them? (

klenot 04-18-2012 06:23 AM

How do I get back packages after I excluded them?
Hello all,

I did set up a CentOS 6.2 machine and installed the PostgreSQL 8.4 from packages found in the CentOS 6.2 repos.

Later, I decided to upgrade the PostgreSQL to version 9.1, so I googled for instructions how to do it. For this, the CentOS repo packages with postgre 8.4 have to be excluded before packages 'postgresql91' could be used. So following to tutorial found on web, I did this:

- In the file '/etc/yum.repos.d/CentOS-Base.repo' into sections '[base]' and '[updates]' I did inserted this line:

Then I downloaded the repopackage and the installed the postgresql91 packages:

[root@...]# wget
[root@...]# rpm  -i  pgdg-centos91-9.1-4.noarch.rpm
[root@...]# yum  install  postgresql91  postgresql91-server  postgresql91-libs  postgresql91-contrib

Everything went OK and have had a PostgreSQL 9.1 up and running perfectly.

Now I decided to revert to Postgre 8.4. So I removed the postgresql91 packages smoothly:

[root@...]# yum  remove  postgresql91.i686  postgresql91-contrib.i686  postgresql91-libs.i686  postgresql91-server.i686
  ... (lot of output with no error)
[root@...]# yum  remove  pgdg-centos91.noarch
  ... (lot of output with no error)

Then I removed the lines 'exclude=postgresql*' from file '/etc/yum.repos.d/CentOS-Base.repo', but now I cannot see nor install the original postgre 8.4 packages in the CentOS repos, even I use the switch '--disableexcludes=all' with yum (although, I think it is redundant once I removed those 'exclude=postgresql*' from file '/etc/yum.repos.d/CentOS-Base.repo'.

[root@...]# yum  list  all  --disableexcludes=all  |  grep  -i  '\(pg\|sql\)'
gnupg2.i686                        2.0.14-4.el6                @base/$releasever
gpgme.i686                        1.1.8-3.el6                @base/$releasever
libgpg-error.i686                  1.7-4.el6                  @base/$releasever
mysql-libs.i686                    5.1.61-1.el6_2.1            @updates
pygpgme.i686                      0.1-18.20090824bzr68.el6    @base/$releasever
qt-sqlite.i686                    1:4.6.2-20.el6              @base/$releasever
sqlite.i686                        3.6.20-1.el6                @base/$releasever

So, how do I get back the original packages (or the repo-package) for PostgreSQL 8.4 now? I even tried things like:

[root@...]# yum  clean  all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos:
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@...]# yum  install  postgresql  postgresql-server  postgresql-libs  postgresql-contrib
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package postgresql available.
No package postgresql-server available.
No package postgresql-libs available.
No package postgresql-contrib available.
Error: Nothing to do

Thank you for advice.

pan64 04-18-2012 07:28 AM

it looks like it cannot find packages. maybe you did not restore the old repo for 8.4, or you have mistyped something?

klenot 04-18-2012 09:26 AM

pan64: Thank you for reply.

I helped myself the same way as I got and installed the 9.1:
- Downloaded the repo-package and installed it
- Installed the actual postgreSQL 8.4 packages.


# wget
# rpm -i pgdg-centos-8.4-3.noarch.rpm
# yum list all | grep -i '\(pg\|sql\|post\)'
  ... (a lot of 'postgresql84...' packages listed)
# yum install postgresql84.i686 postgresql84-libs.i686 postgresql84-server.i686 postgresql84-contrib.i686
  ... (a lot of output with no error)

Easy. Just I don't know where the original repo-package for Postgre 8.4 from CentOS-Base repo went. Never mind, it is solved now.

lithos 04-18-2012 10:32 AM


Originally Posted by klenot (Post 4656034)

I did set up a CentOS 6.2 machine and installed the PostgreSQL 8.4 from packages found in the CentOS 6.2 repos.

[root@...]# yum  install  postgresql  postgresql-server  postgresql-libs  postgresql-contrib
Thank you for advice.

Probably there was nothing wrong with CentOS Base repo,
if you would first search for package you would see the package name, then you would need to install it with exact name as found, to be successful.

If you're installing like
yum install postgresql
then the package was not found, you need to use exact package name, like:
yum install postgresql84

yum install postgresql*

to install it.

klenot 04-24-2012 06:14 PM


In CentOS 6.2 repos, the postgre packages do not have the version postfix. Now I am sitting at a fresh CentOS 6.2 setup and this is the output of 'yum list':


[root@san ~]# yum  list  |  grep  postgre
bacula-director-postgresql.i686    5.0.0-9.el6                base
bacula-storage-postgresql.i686    5.0.0-9.el6                base
freeradius-postgresql.i686        2.1.10-5.el6                base
postgresql.i686                    8.4.9-1.el6_1.1            base
postgresql-contrib.i686            8.4.9-1.el6_1.1            base
postgresql-devel.i686              8.4.9-1.el6_1.1            base
postgresql-docs.i686              8.4.9-1.el6_1.1            base
postgresql-jdbc.i686              8.4.701-3.el6              base
postgresql-libs.i686              8.4.9-1.el6_1.1            base
postgresql-odbc.i686              08.04.0200-1.el6            base
postgresql-plperl.i686            8.4.9-1.el6_1.1            base
postgresql-plpython.i686          8.4.9-1.el6_1.1            base
postgresql-pltcl.i686              8.4.9-1.el6_1.1            base
postgresql-server.i686            8.4.9-1.el6_1.1            base
postgresql-test.i686              8.4.9-1.el6_1.1            base
qt-postgresql.i686                1:4.6.2-20.el6              base

So, I was looking for those postfixless packages.

But it is better, what I have now, after downloading the repopackage directly from, because it refers to newer packages (8.4.11) than to which the default CentOS 6.2 repos refer (8.4.9).

All times are GMT -5. The time now is 04:48 PM.