我尝试多次通过终端安装 Unity Tweak 工具,但每次都给出以下输出。同样,我无法通过 Ubuntu 软件中心安装它。我试过sudo apt-get install -f
& sudo apt-get install unity-tweak-tool
。使用终端时的输出如下:
nikunj@nikunj-DL-H61MXE-V:~$ sudo apt-get install unity-tweak-tool
[sudo] password for nikunj:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
unity-tweak-tool
0 upgraded, 1 newly installed, 0 to remove and 170 not upgraded.
Need to get 0 B/368 kB of archives.
After this operation, 2,761 kB of additional disk space will be used.
(Reading database ... 197290 files and directories currently installed.)
Preparing to unpack .../unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb ...
Unpacking unity-tweak-tool (0.0.7-0~201~ubuntu15.10.1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb (--unpack):
cannot copy extracted data for './usr/share/unity-tweak-tool/monitor-window-snapping.png' to '/usr/share/unity-tweak-tool/monitor-window-snapping.png.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
nikunj@nikunj-DL-H61MXE-V:~$
答案1
看起来缓存中的包已损坏。首先使用以下命令清理缓存:
sudo apt-get clean
在安装软件包之前:
sudo apt-get install unity-tweak-tool