Sunday, April 28, 2024
21
rated 0 times [  21] [ 0]  / answers: 1 / hits: 1553  / 12 Months ago, mon, may 29, 2023, 4:10:27

In an attempt to install cuda, I copy-pasted some apt-get install packages. For unknown reasons the line that I got run in the end is the following:



sudo apt-get install libgtk2.0-


The result was that many packages got removed. Randomly picking a few:



libreoffice-*
python-*
xfce4-*


The list is huge. A considerable number of system parts have been uninstalled. Now this seems like a serious deviation from what I expect when I run apt-get install.



What is going on?


More From » command-line

 Answers
3

The problem is the following (from man apt-get):




install



install is followed by one or more packages desired for
installation or upgrading. Each package is a package name, not
a fully qualified filename (for instance, in a Debian system,
apt-utils would be the argument provided, not
apt-utils_0.9.12.1_amd64.deb). All packages required by the
package(s) specified for installation will also be retrieved
and installed. The /etc/apt/sources.list file is used to locate
the desired packages. If a hyphen is appended to the package
name (with no intervening space), the identified package will
be removed if it is installed
. Similarly a plus sign can be
used to designate a package to install. These latter features
may be used to override decisions made by apt-get's conflict resolution system.




So, adding a hyphen to the end of a package name means "remove that package". Specifically, in your case, it would remove these:



Note, selecting 'libgtk2.0-doc' for regex 'libgtk2.0'
Note, selecting 'libgtk2.0-cil' for regex 'libgtk2.0'
Note, selecting 'libgtk2.0-bin' for regex 'libgtk2.0'
Note, selecting 'libgtk2.0-common' for regex 'libgtk2.0'
Note, selecting 'libgtk2.0-0' for regex 'libgtk2.0'
Note, selecting 'libgtk2.0-cil-dev' for regex 'libgtk2.0'
Note, selecting 'libgtk2.0-0-dbg' for regex 'libgtk2.0'
Note, selecting 'libgtk2.0-dev' for regex 'libgtk2.0'


In other words, you removed the entire gtk2 library set, and a lot of programs depend on gtk2. As a result, a lot of programs were removed.



So, no, this is not a bug. It is, admittedly, surprising behavior if you don't know about it but it is documented and intended.


[#25984] Monday, May 29, 2023, 12 Months  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
icielight

Total Points: 158
Total Questions: 92
Total Answers: 93

Location: San Marino
Member since Thu, Jun 30, 2022
2 Years ago
;