![Ubuntu 18.04 中的 readline 库问题](https://linux22.com/image/906228/Ubuntu%2018.04%20%E4%B8%AD%E7%9A%84%20readline%20%E5%BA%93%E9%97%AE%E9%A2%98.png)
当尝试运行sudo apt install debsig-verify
安装 Slack 所需的程序时,我收到以下错误消息:
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libreadline-dev:i386 :
Depends: libreadline7:i386 (= 7.0-3) but 7.0-0ubuntu2 is to be
installed
Depends: libtinfo-dev:i386 but it is not going to be installed libreadline7 :
Breaks: libreadline7:i386 (!= 7.0-3) but 7.0-0ubuntu2 is to be installed \
libreadline7:i386 :
Breaks: libreadline7 (!= 7.0-0ubuntu2) but 7.0-3 is to be installed`
当我尝试时,sudo apt --fix-broken install
我得到了以下结果:
The following additional packages will be installed:
libreadline7:i386
The following packages will be upgraded:
libreadline7:i386
1 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
4 not fully installed or removed.
Need to get 0 B/128 kB of archives.
After this operation, 8 192 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 271028 files and directories currently installed.)
Preparing to unpack .../libreadline7_7.0-3_i386.deb ...
Unpacking libreadline7:i386 (7.0-3) over (7.0-0ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives>/libreadline7_7.0-3_i386.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libreadline7/changelog.Debian.gz', which is different from other instances of package libreadline7:i386
Errors were encountered while processing:
/var/cache/apt/archives/libreadline7_7.0-3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)`
结果dpkg -S readline.h
:
octave-doc: /usr/share/doc/octave/octave.html/Customizing-readline.html
nodejs: /usr/share/doc/nodejs/api/readline.html
libreadline-dev:amd64, libreadline-dev:i386: /usr/include/readline/readline.h
结果dpkg -l | grep readline
:
ii libreadline-dev:amd64 7.0-3 amd64 GNU readline and history libraries, development files
iU libreadline-dev:i386 7.0-3 i386 GNU readline and history libraries, development files
iF libreadline7:amd64 7.0-3 amd64 GNU readline and history libraries, run-time libraries
iU libreadline7:i386 7.0-0ubuntu2 i386 GNU readline and history libraries, run-time libraries
ii readline-common 7.0-3 all GNU readline and history libraries, common files
结果apt-cache policy libreadline7:i386
:
libreadline7:i386:
Installed: 7.0-0ubuntu2
Candidate: 7.0-3
Version table:
7.0-3 500
500 http://ua.archive.ubuntu.com/ubuntu bionic/main i386 Packages
*** 7.0-0ubuntu2 100
100 /var/lib/dpkg/status
自从我从上一个版本更新以来,我一直使用 18.04。也许这就是为什么添加了一些与 18.04 不兼容的内容的原因。
结果sudo apt-get remove libreadline7 -a=i386
:
E: Command line option 'a' [from -a=:i386] is not understood in combination with the other options`
结果sudo apt-get remove libreadline7
:https://pastebin.com/AUmqPyT2
结果sudo apt-get remove readline7:i386
:
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libreadline-dev:i386 :
Depends: libreadline7:i386 (= 7.0-3) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)
我还遇到了另一个 readline 依赖性错误。我应该在这里发布它吗?
答案1
删除导致未满足依赖项错误的 libreadline7:i386。卸载 libreadline7:i386 也将解决该trying to overwrite
错误。然后安装 Slack snap 包,作为独立包,它不会造成任何额外的包管理问题或需要任何额外的依赖包。
sudo apt --fix-broken install
sudo apt remove libreadline-dev:i386 libreadline7:i386
Slack 是 Ubuntu 18.10 中的原生 snap 包。要在所有当前支持的 Ubuntu 版本中安装 Slack,请打开终端并输入:
sudo snap install slack --classic
此命令将安装 Slack 的最新稳定版本,如果有更新可用,它也将自动更新。
要启动 Slack,请单击 Dash 中的图标或从终端运行此命令:
snap run slack
Slack 有一个免费版本,适合小型团队或任何想要无限期试用 Slack 的人。