Installation Frustrations
I am bad at linux installations. Really really bad. This post is more of a rant than anything useful
I messed up the auto start service while testing out some upgrades and needed to reinstall the postgresql 8.3 server package:
# rpm -i postgresql-server-8.3.13-1PGDG.x86_64.rpm package postgresql-server-8.3.13-1PGDG.x86_64 is already installed
Umm OK I’ll remove it first then:
# rpm -e postgresql-server-8.3.13-1PGDG.x86_64.rpm error: package postgresql-server-8.3.13-1PGDG.x86_64.rpm is not installed
Umm OK. What does yum have to say:
# yum list installed postgresql\* Loaded plugins: rhnplugin, security Installed Packages postgresql.x86_64 8.3.13-1PGDG installed postgresql-contrib.x86_64 8.3.13-1PGDG installed postgresql-libs.x86_64 8.3.13-1PGDG installed postgresql-plperl.x86_64 8.3.13-1PGDG installed postgresql-plpython.x86_64 8.3.13-1PGDG installed postgresql-pltcl.x86_64 8.3.13-1PGDG installed postgresql-server.x86_64 8.3.13-1PGDG installed
So yum thinks it’s installed. Let’s try removing it with yum:
# yum remove postgresql-server Loaded plugins: rhnplugin, security ============================================================================================================================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================================================================================================================ Removing: postgresql-server x86_64 8.3.13-1PGDG installed 12 M Removing for dependencies: postgresql-plperl x86_64 8.3.13-1PGDG installed 72 k postgresql-plpython x86_64 8.3.13-1PGDG installed 49 k postgresql-pltcl x86_64 8.3.13-1PGDG installed 50 k Transaction Summary ============================================================================================================================================================================================================================================ Install 0 Package(s) Update 0 Package(s) Remove 4 Package(s) Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction error reading information on service postgresql: No such file or directory Erasing : postgresql-pltcl 1/4 error: %preun(postgresql-server-8.3.13-1PGDG.x86_64) scriptlet failed, exit status 1 Erasing : postgresql-plpython 2/4 Erasing : postgresql-plperl 3/4 Removed: postgresql-server.x86_64 0:8.3.13-1PGDG Dependency Removed: postgresql-plperl.x86_64 0:8.3.13-1PGDG postgresql-plpython.x86_64 0:8.3.13-1PGDG postgresql-pltcl.x86_64 0:8.3.13-1PGDG Complete!
Well it removed the dependency language packages, but not the server package. Fair enough, the postgresql service is indeed missing but why should that stop the uninstall?
# chkconfig --list postgresql error reading information on service postgresql: No such file or directory
I added the service back manually by recreating the /etc/init.d/postgresql file (copied a different server) and then made sure it could add and recognise the service:
# chkconfig --add postgresql # chkconfig --list postgresql postgresql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Now a yum remove works:
# yum remove postgresql-server Loaded plugins: rhnplugin, security ============================================================================================================================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================================================================================================================ Removing: postgresql-server x86_64 8.3.13-1PGDG installed 12 M Transaction Summary ============================================================================================================================================================================================================================================ Install 0 Package(s) Update 0 Package(s) Remove 1 Package(s) Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Erasing : postgresql-server 1/1 warning: /var/lib/pgsql/.bash_profile saved as /var/lib/pgsql/.bash_profile.rpmsave Removed: postgresql-server.x86_64 0:8.3.13-1PGDG Complete!
Yay, now I know what to do the next time I mess it up… in about 5 mins.
Article Series
Kick Ass PostgreSQL Books
Recent Posts
Kick Ass Oracle Books
Popular Posts
- Top 10 Missing PostgreSQL Features 487 view(s)
- PostgreSQL vs Oracle Differences #4 - Shared Memory Usage 371 view(s)
- PostgreSQL vs Oracle Differences #3 - System Resources 331 view(s)
- pg_restore: [archiver] unsupported version (1.12) in file header 289 view(s)
- PostgreSQL - Dropping a template database 265 view(s)
- PostgreSQL Database Capacity Planning 1 - Disk Space 148 view(s)
- PostgreSQL vs Oracle Differences #1 - Clusters 145 view(s)
- PostgreSQL vs Oracle Differences #2 - Support 99 view(s)
Archives
- March 2012 (1)
- September 2011 (1)
- August 2011 (2)
- July 2011 (3)
- June 2011 (10)
- May 2011 (10)
- April 2011 (7)
- March 2011 (10)
- February 2011 (5)
- January 2011 (1)
- December 2010 (4)
- November 2010 (2)
- October 2010 (3)
Tags
Categories
- Linux (23)
- Oracle (6)
- PostgreSQL (55)
- Uncategorized (1)
- Windows (7)



