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

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.

Related

unable to run apt-get -f install on debian

I have a system that is due to be upgraded but I'm having conflicts with apt-get -f install:
apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
login sysvinit-utils util-linux
Suggested packages:
kbd util-linux-locales
The following packages will be upgraded:
login sysvinit-utils util-linux
3 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
13 not fully installed or removed.
Need to get 0 B/1775 kB of archives.
After this operation, 1886 kB of additional disk space will be used.
Do you want to continue? [Y/n]
E: Sub-process false returned an error code (1)
E: Prior errors apply to /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/util-linux_2.36.1-8_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/login_1%3a4.8.1-1_arm64.deb
debconf: apt-extracttemplates failed: No such file or directory
(Reading database ... 9765 files and directories currently installed.)
Preparing to unpack .../sysvinit-utils_2.96-7_arm64.deb ...
Unpacking sysvinit-utils (2.96-7) over (2.88dsf-59) ...
dpkg: error processing archive /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb (--unpack):
trying to overwrite '/lib/init/vars.sh', which is also in package initscripts 2.88dsf-59
Errors were encountered while processing:
/var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't understand why it says E: Sub-process false returned an error code (1) after I confirm installation of the packages. Can anyone help me with this?
initscripts is a purely virtual package, so it is safe to give dpkg permission to overwrite it. Open the terminal and type:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
If you're not using dpkg directly and using an apt front-end like apt or apt-get, the following command defines the same custom dpkg option to use as the previous command.
sudo apt-get -o Dpkg::Options::="--force-overwrite" install sysvinit-utils
Try to flush the cache and reinstall then :
apt autoremove
apt clean
apt autoclean
apt update
apt install -f
if it doesn't help, try to remove the problematic packages and reinstall them normally.

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

rvm throws following error while installing ruby 2.0.0

I am getting the following error while installing the fresh ruby 2.0.0-p648 through rvm
$ rvm install 2.0.0
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.0.0-p648.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..bob password required for 'apt-get --quiet --yes update':
...........
Installing required packages: libgmp-dev....
Error running 'requirements_debian_libs_install libgmp-dev',
showing last 15 lines of /home/rank/.rvm/log/1467783851_ruby-2.0.0-p648/package_install_libgmp-dev.log
++ sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install libgmp-dev'\'': ' apt-get --no-install-recommends --yes install libgmp-dev
Reading package lists...
Building dependency tree...
Reading state information...
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:
libgmp-dev : Depends: libgmp10 (= 2:5.0.2+dfsg-2ubuntu1) but 2:5.1.3+dfsg-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
++ return 100
++ return 100
Requirements installation failed with status: 100.
Please help

Trouble installing libaio-dev

This is error code I get. I'm using mint Debian edition
apt-get install libaio-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libaio-dev
0 upgraded, 1 newly installed, 0 to remove and 983 not upgraded.
18 not fully installed or removed.
N eed to get 0 B/25.5 kB of archives.
After this operation, 143 kB of additional disk space will be used.
(Reading database ... 170878 files and directories currently installed.)
Unpacking libaio-dev (from .../libaio-dev_0.3.109-2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libaio-dev_0.3.109-2_amd64.deb (--unpack):
trying to overwrite '/usr/share/man/man2/io_getevents.2.gz', which is also in package manpages-dev 3.28-1
configured to not write apport reports
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/libaio-dev_0.3.109-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get remove manpages-dev
sudo apt-get install libaio-dev manpages-dev

Resources