Aptitude 具有未满足的依赖关系,并且在执行建议的修复时遇到分段错误。我如何解决它?

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

我在 Ubuntu 17.10,刚安装并尝试使用 apt-get install ruby-full 安装 Ruby。安装失败,现在 aptitude 显示

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).

我尝试了建议的命令以及 sudo apt-get install -f -y 无济于事:它开始安装过程然后告诉我处理 ruby2.3-doc 存档

时出错

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)

我尝试清除 aptitude 的缓存以防包无法正确下载,但并没有解决问题。

因为这意味着存在未满足的依赖项,我无法 运行 其他 aptitude 操作来尝试安装新包或删除 ruby-full

我怎样才能删除这个 ruby-完整的包,以便我可以使用 rvm 再试一次?

我最终删除了 riruby-full 以及当时提到的其他包 运行 apt-get update