LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-18-2012, 06:23 AM   #1
klenot
LQ Newbie
 
Registered: Sep 2010
Location: Prague, Czech Republic
Posts: 13

Rep: Reputation: 0
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:
Code:
exclude=postgresql*
Then I downloaded the repopackage and the installed the postgresql91 packages:
Code:
[root@...]# wget  http://yum.postgresql.org/9.1/redhat/rhel-6-i386/pgdg-centos91-9.1-4.noarch.rpm
[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:
Code:
[root@...]# yum  remove  postgresql91.i686  postgresql91-contrib.i686  postgresql91-libs.i686  postgresql91-server.i686
  ... (lot of output with no error)
Complete!
[root@...]# yum  remove  pgdg-centos91.noarch
  ... (lot of output with no error)
Complete!
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'.
Code:
[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:
Code:
[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.
 
Old 04-18-2012, 07:28 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,735

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
it looks like it cannot find packages. maybe you did not restore the old repo for 8.4, or you have mistyped something?
 
Old 04-18-2012, 09:26 AM   #3
klenot
LQ Newbie
 
Registered: Sep 2010
Location: Prague, Czech Republic
Posts: 13

Original Poster
Rep: Reputation: 0
Done.

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.

Code:
# wget http://yum.postgresql.org/8.4/redhat/rhel-6-i386/pgdg-centos-8.4-3.noarch.rpm
# 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.
 
Old 04-18-2012, 10:32 AM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by klenot View Post

I did set up a CentOS 6.2 machine and installed the PostgreSQL 8.4 from packages found in the CentOS 6.2 repos.
.....
Code:
[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

or
yum install postgresql*

to install it.

Last edited by lithos; 04-18-2012 at 10:33 AM.
 
Old 04-24-2012, 06:14 PM   #5
klenot
LQ Newbie
 
Registered: Sep 2010
Location: Prague, Czech Republic
Posts: 13

Original Poster
Rep: Reputation: 0
lithos,

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

Code:
[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 postgresql.org, because it refers to newer packages (8.4.11) than to which the default CentOS 6.2 repos refer (8.4.9).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
proftp-mysql issue : packages excluded due to repository priority protections kergad Linux - Server 2 05-22-2011 09:21 PM
[SOLVED] Update: The following packages have been kept back ??? taylorkh Ubuntu 4 04-07-2011 05:58 AM
packages have been kept back cccc Debian 7 02-24-2011 10:40 AM
[SOLVED] apt-get upgrade keeps some packages back 10110111 Ubuntu 5 09-30-2010 05:50 AM
apt-get upgrade packages have been kept back cccc Debian 7 04-11-2007 02:35 PM


All times are GMT -5. The time now is 01:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration