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?

1

There are 1 best solutions below

0
On BEST ANSWER

I ended up removing ri, ruby-full, and the other packages mentioned then ran apt-get update.