当我安装类似的东西时sudo apt install -y putty
我收到错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
imagemagick : Depends: imagemagick-6.q16 (>= 8:6.9.2.10+dfsg-2~)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
当我尝试apt --fix-broken install
我收到错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libept1.6.0
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
imagemagick-6.q16 netpbm
Suggested packages:
imagemagick-doc autotrace enscript ffmpeg gimp gnuplot grads graphviz hp2xx
html2ps libwmf-bin mplayer povray radiance texlive-base-bin transfig
ufraw-batch
The following NEW packages will be installed:
imagemagick-6.q16 netpbm
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,444 kB of archives.
After this operation, 5,009 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 193102 files and directories currently installed.)
Preparing to unpack .../imagemagick-6.q16_8%3a6.9.10.23+dfsg-2.1ubuntu11.4_amd64.deb ...
Unpacking imagemagick-6.q16 (8:6.9.10.23+dfsg-2.1ubuntu11.4) ...
dpkg: error processing archive /var/cache/apt/archives/imagemagick-6.q16_8%3a6.9.10.23+dfsg-2.1ubuntu11.4_amd64.deb (--unpack):
unable to create '/usr/bin/animate-im6.q16.dpkg-new' (while processing './usr/bin/animate-im6.q16'): Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../netpbm_2%3a10.0-15.3build1_amd64.deb ...
Unpacking netpbm (2:10.0-15.3build1) ...
dpkg: error processing archive /var/cache/apt/archives/netpbm_2%3a10.0-15.3build1_amd64.deb (--unpack):
unable to create '/usr/bin/pbmtobbnbg.dpkg-new' (while processing './usr/bin/pbmtobbnbg'): Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/imagemagick-6.q16_8%3a6.9.10.23+dfsg-2.1ubuntu11.4_amd64.deb
/var/cache/apt/archives/netpbm_2%3a10.0-15.3build1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
当我检查时ls -al /usr
我得到:
drwxr-xr-x 2 root root 69632 Jul 23 15:16 bin
我无法在/usr/bin directory
我如何创建任何文件/usr/bin directory
以便apt --fix-broken install
可以工作?
答案1
@tom-yan “chattr -i /usr/bin” 有效
答案2
$ sudo apt-get clean
$ sudo apt-get 更新
$ sudo apt-get install --reinstall "应用程序"
$ sudo apt-get -f 安装
将应用程序替换为您要安装的任何内容