来源

来源

就在最近,我修复了运行 14.04 LTS 的笔记本电脑的无线驱动程序,但现在连接不断断开。所以我四处寻找,发现你可以尝试更新内核,我尝试这样做。当它出现在软件中心时,它说依赖项未得到满足或类似的东西。

然后,我决定使用软件更新程序,看看是否能解决问题。这就是所有问题所在。当我进入软件中心时,它说由于某些问题需要修复。我点击了修复,结果出现了错误。之后,Firefox 根本打不开。尝试下载另一个浏览器也没有用,因为软件中心又出现了另一个问题……我点击了那个红色的小东西,它说运行“sudo apt-get -f install”

当我运行命令时,我得到

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  account-plugin-windows-live libupstart1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  unity
The following packages will be upgraded:
  unity
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/1,510 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 200381 files and directories currently installed.)
Preparing to unpack .../unity_7.2.5+14.04.20150521.1-0ubuntu1_amd64.deb ...
Unpacking unity (7.2.5+14.04.20150521.1-0ubuntu1) over (7.2.4+14.04.20141217-0ubuntu1) ...
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/unity_7.2.5+14.04.20150521.1-0ubuntu1_amd64.deb' to decompressor pipe: failed to read (Input/output error)
dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/unity_7.2.5+14.04.20150521.1-0ubuntu1_amd64.deb (--unpack):
 cannot copy extracted data for './usr/lib/compiz/libunityshell.so' to '/usr/lib/compiz/libunityshell.so.dpkg-new': unexpected end of file or stream
E: Sub-process /usr/bin/dpkg returned an error code (1)
kong@kong-Satellite-C75D-B:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 unity : Depends: libunity-core-6.0-9 (= 7.2.4+14.04.20141217-0ubuntu1) but 7.2.5+14.04.20150521.1-0ubuntu1 is installed
E: Unmet dependencies. Try using -f.
kong@kong-Satellite-C75D-B:~$ -f
-f: command not found
kong@kong-Satellite-C75D-B:~$ apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
kong@kong-Satellite-C75D-B:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  account-plugin-windows-live libupstart1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  unity
The following packages will be upgraded:
  unity
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/1,510 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 200381 files and directories currently installed.)
Preparing to unpack .../unity_7.2.5+14.04.20150521.1-0ubuntu1_amd64.deb ...
Unpacking unity (7.2.5+14.04.20150521.1-0ubuntu1) over (7.2.4+14.04.20141217-0ubuntu1) ...
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/unity_7.2.5+14.04.20150521.1-0ubuntu1_amd64.deb' to decompressor pipe: failed to read (Input/output error)
dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/unity_7.2.5+14.04.20150521.1-0ubuntu1_amd64.deb (--unpack):
 cannot copy extracted data for './usr/lib/compiz/libunityshell.so' to '/usr/lib/compiz/libunityshell.so.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /var/cache/apt/archives/unity_7.2.5+14.04.20150521.1-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

有人知道我该怎么办吗?我是否应该安装不同版本的 ubuntu,因为这个版本似乎对我的 PC 来说充满了问题。

答案1

测试一下:

打开你的电脑。

按住 Shift 键,将调出Grub menu

选择以 开头的行Advanced options

选择以recovery mode

您的电脑应该会显示一个带有多个选项的菜单。

按以下顺序选择:Network -- Drop to root shell prompt

在终端运行:

    mount -o remount,rw /
    mount --all
    rm /var/cache/apt/archives/*.deb
    apt-get update
    apt-get remove --purge libunity-core-6.0-9
    apt-get install --reinstall unity 
    apt-get dist-upgrade
    apt-get -f install
    reboot

来源

答案2

我查看了一下,发现只需要删除之前的包即可。当我再次运行它时,它运行正常。

相关内容