I'm trying to install some software in my Ubuntu Server 12.04 installation, but whenever I try to install it using apt-get or aptitude, I would usually get an error message like this:
E: unable to locate package postgresql-plperl-9.0
E: couldn't find any package by regex 'postgresql-plperl-9.0'
The contents of my /etc/apt/sources.list file is (all of it are uncommented):
deb http://archive.ubuntu.com/ubuntu precise universe multiverse
deb-src http://archive.ubuntu.com/ubuntu precise universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://us.archive.ubuntu.com/ubuntu/ precise universe
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
Any help on why I am encountering this issue is greatly appreciated.
If you really need that specific version, you should use the Postgresql APT repos in addition to the Ubuntu repos.
The are located at http://apt.postgresql.org/pub/repos/apt/
The README file has instructions for using it.
Proof, using that old build on a new Ubuntu 14.04 system:
There is no package named
postgresql-plperl-9.0
available in plain ubuntu.Also Ubuntu 12.04 only contains
postgresql-8.4
andpostgresql-9.1
.If this package is included in any other package source then you have to include this.
My suggestion is to run:
Before attempting to install the software with apt-get install, to ensure that the right package names, locations and dependency lists are set up on your machine before it tries to grab all the packages.
Seems simple but it's fixed problems with similar errors for me in the past.
Well, I did a check and realized that the extra lines in the sources.list file to be missing the "universe" line at the end of the list.
So I added it to something like this:
deb http://mirrors.kernel.org/ubuntu precise main universe and deb-src http://mirrors.kernel.org/ubuntu precise main universe
ran
apt-get update
, and it works.