Ubuntu 12.04 cannot install applications

Dani AI

Generated

As , and already suggested, start by noting the exact error text shown when an install fails — that tells you whether the problem is network/repository-related, a locked/broken package database, or a missing package name. The advice to refresh package lists and to install by package name is sound; the steps below cover common follow-ups that are not shown in the replies.

Quick local checks and repairs (make a backup and do these only when no other package process is running):

ps aux | egrep 'apt|dpkg'
sudo fuser -v /var/lib/dpkg/lock || true
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get clean

If you see persistent “404” or “not found” errors, and the machine is running Ubuntu 12.04, repositories for that release may have been archived. Back up /etc/apt/sources.list first, then point your sources to the archive server for old releases (replace any existing archive/security hosts with the old-releases host):

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's|archive.ubuntu.com/ubuntu|old-releases.ubuntu.com/ubuntu|g; s|security.ubuntu.com/ubuntu|old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list

After that, refresh package metadata and retry the install (as advised). Also confirm the universe/multiverse components are enabled if the package lives there, and check logs at /var/log/apt/term.log and /var/log/dpkg.log for precise clues. If the system is still failing or if you need current security updates, plan to move off 12.04 to a supported Ubuntu release; trying to retrofit EOL systems is fragile. If problems persist, include the full error lines so responders can give targeted fixes.

Recommended Answers

All 3 Replies

We need more details: which applications and versions? what have you tried to do? is this a fresh install or it stopped working? do you get any errors when you try to perform the install action?

From terminal try:

sudo apt-get update
sudo apt-get upgrade

and then retry to install.

cereal is precisely correct. If you know the package name, you can also type

apt-get install [package-name]

For example, if I want to install an nginx server on my ubuntu, I would type this on my terminal

    sudo -s
    // system will ask for password
    // I must provide the password

    sudo apt-get install nginx

Please ignore the [ and ] just type the package name of what you are trying install.

commented: sa +0

Also, if you don't know the package name, then use the following

apt-cache search [search term]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.