Broken packages
Solved
Hello,
After trying to upgrade to a newer version of Ubuntu, and the failure of that installation, I have on my screen a no entry sign that tells me there are broken packages (I don't know what that means at all) and I can't do security updates that I was doing without problem before. Can someone help me? Thanks
Configuration: Linux / Firefox 48.0
After trying to upgrade to a newer version of Ubuntu, and the failure of that installation, I have on my screen a no entry sign that tells me there are broken packages (I don't know what that means at all) and I can't do security updates that I was doing without problem before. Can someone help me? Thanks
Configuration: Linux / Firefox 48.0
3 réponses
Hello,
What are packages?
On Linux, your software is installed via packages. Think of Linux as a big Lego set, where each brick is a package. Each software you use (Firefox, Thunderbird, LibreOffice, VLC...) corresponds to a package (as do the components it relies on).
When you do an update, you update all your packages. The same goes when you upgrade to a newer version of Ubuntu (it’s just that you will be working with a set of more recent packages).
When you uninstall software, you remove or purge packages. And when you install software, you install packages (along with their dependencies).
What is a broken package?
For a package to install, all its dependencies must be installed. It’s a bit like building a house; you need to have the foundations in place first. These dependencies are represented by rules outlined in the packages. For example, you might be told: to install Firefox, certain things must be present in specific versions.
A package is broken if it is impossible, without manual intervention, to ensure that all these dependencies are simultaneously installed on the system.
This can happen during an update when there are both obsolete packages and up-to-date packages coexisting on your system. Some recent packages may require packages of a recent version, while your system is still using outdated packages.
In general:
- all your packages are supposed to be as up-to-date as possible
- no package is supposed to be broken
- no package is supposed to be held (or frozen) in an old version.
The package manager
It's the collection of software that manages your packages. On Ubuntu, it's APT, which brings together several apt commands (apt-get, apt-cache, apt-search, aptitude...), which relies on dpkg commands (there are many of those), etc...
To avoid having to use all these commands and understand what they do, you can use a graphical interface (typically Software Center) which actually works with these commands.
https://doc.ubuntu-fr.org/software-center
Unfortunately, it is not always able to find the "right" decision for updating in case of major changes (typically when changing Ubuntu version).
How to solve the problem?
There are two schools of thought:
a) for a complicated migration, some prefer to reinstall while keeping their home. But this forces you to reinstall your software afterward (it is possible to save the list of installed software by listing them in a file with the command
b) otherwise, it's possible to see what is blocking the package manager and tell it what to do to move forward.
Let’s try to see if (b) is easily feasible. Open a terminal and run:
Then copy and paste the result of the last command without confirming it (when it asks if you want to continue, respond with n).
Good luck!
What are packages?
On Linux, your software is installed via packages. Think of Linux as a big Lego set, where each brick is a package. Each software you use (Firefox, Thunderbird, LibreOffice, VLC...) corresponds to a package (as do the components it relies on).
When you do an update, you update all your packages. The same goes when you upgrade to a newer version of Ubuntu (it’s just that you will be working with a set of more recent packages).
When you uninstall software, you remove or purge packages. And when you install software, you install packages (along with their dependencies).
What is a broken package?
For a package to install, all its dependencies must be installed. It’s a bit like building a house; you need to have the foundations in place first. These dependencies are represented by rules outlined in the packages. For example, you might be told: to install Firefox, certain things must be present in specific versions.
A package is broken if it is impossible, without manual intervention, to ensure that all these dependencies are simultaneously installed on the system.
This can happen during an update when there are both obsolete packages and up-to-date packages coexisting on your system. Some recent packages may require packages of a recent version, while your system is still using outdated packages.
In general:
- all your packages are supposed to be as up-to-date as possible
- no package is supposed to be broken
- no package is supposed to be held (or frozen) in an old version.
The package manager
It's the collection of software that manages your packages. On Ubuntu, it's APT, which brings together several apt commands (apt-get, apt-cache, apt-search, aptitude...), which relies on dpkg commands (there are many of those), etc...
To avoid having to use all these commands and understand what they do, you can use a graphical interface (typically Software Center) which actually works with these commands.
https://doc.ubuntu-fr.org/software-center
Unfortunately, it is not always able to find the "right" decision for updating in case of major changes (typically when changing Ubuntu version).
How to solve the problem?
There are two schools of thought:
a) for a complicated migration, some prefer to reinstall while keeping their home. But this forces you to reinstall your software afterward (it is possible to save the list of installed software by listing them in a file with the command
dpkg --get-selections, but since some change names when upgrading Ubuntu versions, it's not a perfect solution).
b) otherwise, it's possible to see what is blocking the package manager and tell it what to do to move forward.
Let’s try to see if (b) is easily feasible. Open a terminal and run:
sudo apt-get update
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude safe-upgrade
Then copy and paste the result of the last command without confirming it (when it asks if you want to continue, respond with n).
Good luck!
When he asks you for your password, you must type your password blindly and then press enter. Indeed, in a terminal, nothing is displayed to prevent someone watching from knowing how many characters your password contains.
Example :
Good luck
Example :
(mando@velvet) (~) $ sudo apt-get update
[sudo] Password for mando:
Get:1 http://ftp.fr.debian.org/debian/ testing InRelease [251 kB]
Get:2 https://www.debian.org/security/ testing/updates InRelease [68.2 kB]
Get:3 http://ftp.fr.debian.org/debian/ testing/main amd64 Packages.diff/Index [27.9 kB]
...
Good luck
Hello,
I tried, I opened a terminal, typed the first line and it immediately asks for my password, and then it freezes, nothing is possible anymore.
So I went to the Ubuntu documentation (the link provided), but since I don't understand anything at all, I didn't dare to go anywhere.
Sorry for being so clueless!
In any case, thank you for all your explanations that I will keep.
I tried, I opened a terminal, typed the first line and it immediately asks for my password, and then it freezes, nothing is possible anymore.
So I went to the Ubuntu documentation (the link provided), but since I don't understand anything at all, I didn't dare to go anywhere.
Sorry for being so clueless!
In any case, thank you for all your explanations that I will keep.