How to fix apt package contamination? - apt

I have a linux distro "Pop_OS" installation that is contaminated by ubuntu. Specifically, its audio driver is broken.
When I try to use aptitude to force install "pulseaudio", it demonstrates the simple situation:
$ sudo aptitude install pulseaudio
The following NEW packages will be installed:
pulseaudio
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 913 kB of archives. After unpacking 4,674 kB will be used.
The following packages have unmet dependencies:
pop-desktop : Conflicts: pulseaudio but 1:15.99.1+dfsg1-1ubuntu2 is to be installed
Conflicts: pulseaudio:i386 but it is not going to be installed
pipewire-alsa : Conflicts: pulseaudio but 1:15.99.1+dfsg1-1ubuntu2 is to be installed
Conflicts: pulseaudio:i386 but it is not going to be installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) pulseaudio [Not Installed]
Accept this solution? [Y/n/q/?] n
*** No more solutions available ***
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) pulseaudio [Not Installed]
Obviously, the easy solution would be to uninstall pulseaudio but 1:15.99.1+dfsg1-1ubuntu2 (which cannot be found in upstream), and resolve the conflict. But aptitude shows that "*** No more solutions available ***"
So, why is aptitude so incapable of resolving such a simple conflict? And what tool is smart enough to do that?

Related

Aptitude has unmet dependencies and encounters a segmentation fault when performing the recommended fix. How do I fix it?

I am on Ubuntu 17.10, freshly installed and tried to installed Ruby using apt-get install ruby-full. It failed to install and now aptitude says
The following packages have unmet dependencies:
ri: Depends: ruby2.3-doc but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specifiy a solution).
I tried the suggested command as well as sudo apt-get install -f -y to no avail: It begins the install process then tells me there was an error processing the ruby2.3-doc archive
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
ruby2.3-doc
The following NEW packages will be installed:
ruby2.3-doc
0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.
21 not fully installed or removed.
Need to get 0 B/3,382 kB of archives.
After this operation, 27.7 MB of additional disk space will be used.
(Reading database ... 182724 files and directories currently installed.)
Preparing to unpack .../ruby2.3-doc_2.3.3-1ubuntu1_all.deb ...
Unpacking ruby2.3-doc (2.3.3-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/ruby2.3-doc_2.3.3-1ubuntu1_all.deb (--unpack):
unable to open '/usr/share/ri/2.3.0/system/page-ChangeLog-2_1_0.ri.dpkg->new': Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/ruby2.3-doc_2.3.3-1ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried clearing aptitude's cache in case a package failed to download correctly but that did not fix it.
Because this means there are unmet dependencies, I'm unable to run other aptitude operations to try and install new packages or remove ruby-full.
How can I remove this ruby-full package so I can try again using rvm?
I ended up removing ri, ruby-full, and the other packages mentioned then ran apt-get update.

vlc installation in ubuntu 16.10

My vlc was working file but after installing octave vlc crashed.
I tried to reinstall it and repair it with below codes but it did't work
$ sudo apt-get purge vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'vlc' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
$sudo apt-get install vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested
an impossible situation or if you are using the unstable distribution that
some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
vlc : Depends: libgles1-mesa (>= 7.8.1) but it is not going to be installed or
libgles1
E: Unable to correct problems, you have held broken packages.
Then I tried installing libgles1-mesa
$ sudo apt-get install libgles1-mesa
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgles1-mesa : Depends: libglapi-mesa (= 13.0.4-1ubuntu1~16.10~0.1) but
17.0.3~git20170404+17.0.71d2f05a-0ubuntu0ricotz2~yakkety is to be installed
E: Unable to correct problems, you have held broken packages.
Then I tried libglapi-mesa
$ sudo apt-get install libglapi-mesa
Reading package lists... Done
Building dependency tree
Reading state information... Done
libglapi-mesa is already the newest version (17.0.3~git20170404+17.0.71d2f05a- 0ubuntu0ricotz2~yakkety).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
How am I supposed to solved it.
I only get it to work using master branch of VLC
https://launchpad.net/~videolan/+archive/ubuntu/master-daily
first add the repository
sudo add-apt-repository ppa:videolan/master-daily
sudo apt-get update
sudo apt-get install vlc
The vlc-nox package installs vlc
To remove, use:
sudo apt-get purge vlc-nox
Next, to reinstall vlc, use:
sudo apt-get update
sudo apt-get install vlc
% sudo snap install vlc
VLC for Debian and many other Linux distributions is also packaged using snap packages. This allows us to distribute latest and greatest VLC versions directly to end users, with security and critical bug fixes, full codec and optical media support.
To install via snap:

Phonetisaurus dependency issue

I am trying to install Phonetisaurus (using the Jasper installation instructions here). Unfortunatly I've run into a dependency issue I haven't been able to solve.
When I run the command sudo apt-get -t experimental install phonetisaurus m2m-aligner mitlm libfst-tools I get the following output:
Reading package lists... done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
m2m-aligner : Depends: libstdc++6 (>=5.2) but 4.9.2-10 is to be installed
mitlm : Depends libmitlm0 (= 0.4.1-2) but it is not going to be installed
Depends: libstdc++6 (>=5.2) but 4.9.2-10 is to be installed
phonetisaurus : Depends: libfst4 (>=1.5.3+r3) but it is not installable
Depends: libstdc++6 (>=5.2) but 4.9.2-10 is to be installed
Attempting to install libstdc++6 directly (either with sudo apt-get install libstdc++6 or sudo apt-get -f libstdc++6) leaves me with:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6 is already the newest version.
The following packages were automatically installed and are no longer required:
libboost-atomic1.55.0 libboost-filesystem1.55.0
libboost-program-options1.55.0 libboost-regex1.55.0 libboost-thread1.55.0
libcwiid1 libfftw3-single3 libjs-prettify libqscintilla2-11
libqscintilla2-l10n libqt4-network libqt4-xmlpatterns libqtwebkit4
libruby1.9.1 libruby1.9.1-dbg libscsynth1 libtcltk-ruby1.9.1 ri1.9.1
ruby1.9.1 ruby1.9.1-dev ruby1.9.1-examples ruby1.9.1-full ruby1.9.3
supercollider supercollider-common supercollider-ide supercollider-language
supercollider-server supercollider-supernova
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
Attempting to install libfst4 gives me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libfst4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libfst4' has no installation candidate
And attempting to install libmitlm0 gives me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmitlm0 : Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed
E: Unable to correct problems, you have held broken packages.
I feel like there is something I'm missing here but after a day of messing around with it I still can't figure it out. Any help/insight would be appreciated.
Thanks G10DRAS for providing the link.
This solution worked for me. First, I downloaded these files
sudo wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/phonetisaurus/is2013-conversion.tgz
sudo wget http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.3.4.tar.gz
Then, untared the files
tar -xvf is2013-conversion.tgz
tar -xvf openfst-1.3.4.tar.gz
Finally, following next steps at: http://jasperproject.github.io/documentation/installation

maven installations on ubuntu fails

I am running Ubuntu 14.10 on VMPlayer 6.0.4 here on ubuntu when I am trying to install maven i am getting the following errors.
ubuntu#ubuntu:~$ sudo apt-get install maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
maven : Depends: libaether-java but it is not going to be installed
Depends: libplexus-containers1.5-java but it is not going to be installed
Depends: libsisu-ioc-java but it is not going to be installed
Depends: libwagon2-java (>= 2.2-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu#ubuntu:~$
As I am new to Linux I am not understanding why its failing and how to solve this.
After googling I tried
i)apt-get update (success)
ii)apt-get upgrade (failed as below)
ubuntu#ubuntu:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
liboxideqt-qmlplugin liboxideqtcore0 linux-generic linux-headers-generic linux-image-generic oxideqt-codecs
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
ubuntu#ubuntu:~$
but still same issue
It would be helpful if someone suggestion me how to fix and install maven
Thanks in advance
May be too late to answer, but I had same issue on Ubuntu 12.04 LTS -- so this may be helpful
Here is a work around...
sudo dpkg -i --force-all /var/cache/apt/archives/libwagon2-java_2.2-3+nmu1_all.deb
The command above will install: libwagon2-java_2.2-3+nmu1_all.deb
After this you will be able to install Maven by: $ sudo apt-get install maven
Update your packages by
sudo apt-get update
then try to install.

Ubuntu 12.10 - Ruby gem rmagick missing dependency issue

Like many others I'm having trouble installing rmagick on Ubuntu when running bundle install.
I get this error on the bundle install command:
Installing rmagick (2.13.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.8.7-p371/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/rvm/gems/ruby-1.8.7-p371/bin:/usr/local/rvm/gems/ruby-1.8.7-p371#global/bin:/usr/local/rvm/rubies/ruby-1.8.7-p371/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-1.8.7-p371/bin/ruby
Gem files will remain installed in /home/selfsale/.bundler/tmp/2908/gems/rmagick-2.13.1 for inspection.
Results logged to /home/selfsale/.bundler/tmp/2908/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
I then did some searching and found some suggestions for adding the missing libs:
sudo apt-get install libmagick9-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libmagick9-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
graphicsmagick-libmagick-dev-compat
E: Package 'libmagick9-dev' has no installation candidate
sudo apt-get install graphicsmagick-libmagick-dev-compat:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
graphicsmagick-libmagick-dev-compat : Depends: libgraphicsmagick1-dev but it is not going to be installed
Depends: libgraphicsmagick++1-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libmagickwand-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickwand-dev : Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libmagickcore-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickcore-dev : Depends: libbz2-dev but it is not going to be installed
Depends: libfreetype6-dev but it is not going to be installed
Depends: libpng-dev
Depends: librsvg2-dev but it is not going to be installed
Depends: libwmf-dev but it is not going to be installed
Depends: libx11-dev but it is not going to be installed
Depends: libxext-dev but it is not going to be installed
Depends: libxt-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libmagick++-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagick++-dev : Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
Depends: libmagickwand-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
It seems that any attempt to install the correct packages comes up with this problem.
I've just seen a post about installing imagemagick from source so I'm going to try that, but if anyone has any better ideas I'd love to hear them.
Thanks
I found the solution:
sudo apt-get install aptitude
Then fire:
sudo aptitude install graphicsmagick-libmagick-dev-compat
When asked:
The following actions will resolve these dependencies:
Keep the following packages at their current version
1) graphicsmagick-libmagick-dev-compat [Not Installed]
2) libexif-dev [Not Installed]
3) libgraphicsmagick++1-dev [Not Installed]
4) libgraphicsmagick1-dev [Not Installed]
Answer: "n"
Accept this solution? [Y/n/q/?] n
In second question:
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libexif12 [0.6.20-2ubuntu0.1 (now) -> 0.6.20-2 (precise)]
Answer: "Y" or hit ENTER
Accept this solution? [Y/n/q/?]
Wait until task end ;)
I just tried on my laptop (Ubuntu 13.04).
gem install rmagick
failed too. Then I did
sudo apt-get install libmagick++-dev
and rmagick installed without problems.
This solution is after all more important than shown before, cuz it removes:
graphicsmagick-libmagick-dev-compat
but solves problem with (in 'bundle install'):
checking for wand/MagickWand.h... no
as show in my second post type in prompt:
sudo aptitude install libmagickwand-dev
At:
The following actions will resolve these dependencies:
Keep the following packages at their current version
1) libatk1.0-dev [Not Installed]
2) libcairo2-dev [Not Installed]
3) libexpat1-dev [Not Installed]
4) libgdk-pixbuf2.0-dev [Not Installed]
5) libglib2.0-dev [Not Installed]
6) libgraphviz-dev [Not Installed]
7) libgtk2.0-dev [Not Installed]
8) libmagickcore-dev [Not Installed]
9) libmagickwand-dev [Not Installed]
10) libpango1.0-dev [Not Installed]
11) librsvg2-dev [Not Installed]
Answer:
Accept this solution? [Y/n/q/?] n
In secound:
The following actions will resolve these dependencies:
Remove the following packages:
1 ) graphicsmagick-libmagick-dev-compat
Install the following packages:
2)libcairo-script-interpreter2 [1.10.2-6.1ubuntu2 (precise)]
[..]
Answer: "Y"
Accept this solution? [Y/n/q/?]
After task is done, U can easily run 'bundle install' in your project directory.
Try installing imagemagick and libmagickwand-dev together:
sudo apt-get install imagemagick libmagickwand-dev
This allows apt to resolve the dependencies properly. (tested on Ubuntu 12.04)
sudo apt-get install libmagick++-dev
rmagick installed success

Resources