我是 Ubuntu 新手,所以请耐心等待。我试图安装一些库,但一直出现错误。运行后,apt-get install -f
我收到相同的错误。似乎当我尝试安装未满足的依赖项时,它们会覆盖当前文件并失败.....所以我尝试了autoremove
,但也失败了。有什么想法吗?
king@king-MS-7640 ~/Downloads/dymo-cups-drivers-1.4.0.5 $ sudo apt-get install libcups2-dev libcupsimage2-dev gcc g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:5.3.1-1ubuntu1).
g++ set to manually installed.
gcc is already the newest version (4:5.3.1-1ubuntu1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libcupsimage2-dev : Depends: libcupsfilters-dev (>= 1.0~b1) but it is not going to be installed
libicu-dev : Depends: libicu55 (= 55.1-7ubuntu0.2) but 55.1-7 is to be installed
libicu55 : Breaks: libicu55:i386 (!= 55.1-7) but 55.1-7ubuntu0.2 is to be installed
libicu55:i386 : Breaks: libicu55 (!= 55.1-7ubuntu0.2) but 55.1-7 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
king@king-MS-7640 ~/Downloads/dymo-cups-drivers-1.4.0.5 $ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libicu55
The following packages will be upgraded:
libicu55
1 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.
2 not fully installed or removed.
Need to get 0 B/7,659 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 ... 294474 files and directories currently installed.)
Preparing to unpack .../libicu55_55.1-7ubuntu0.2_amd64.deb ...
Unpacking libicu55:amd64 (55.1-7ubuntu0.2) over (55.1-7) ...
dpkg: error processing archive /var/cache/apt/archives/libicu55_55.1-7ubuntu0.2_amd64.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libicu55/changelog.Debian.gz', which is different from other instances of package libicu55:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Errors were encountered while processing:
/var/cache/apt/archives/libicu55_55.1-7ubuntu0.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
这是我在该会话中运行的每个命令的转储
854 ./minecraft
855 minecraft
856 sudo /opt/minecraft-launcher/minecraft-launcher.sh
857 sagi minecraft
858 wget http://packages.ubuntu.com/trusty/amd64/libicu52/download
859 dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
860 sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
861 cd Downloads/
862 sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
863 ls
864 wget http://packages.ubuntu.com/trusty/amd64/libicu52/download
865 sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
866 ls
867 sagi libicu52
868 sagi libicu55
869 sagi libicu-dev
870 sudo /opt/minecraft-launcher/minecraft-launcher.sh
871 sagi libicu52
872 sudo /opt/minecraft-launcher/minecraft-launcher.sh
873 sagi libicui18n57
874 sudo wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-3ubuntu0.4_amd64.deb
875 sudo apt-get install -y libicu52_52.1-3ubuntu0.4_amd64.deb
876 wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
877 sudo dpkg -i libicu55_55.1-7_amd64.deb
878 sudo /opt/minecraft-launcher/minecraft-launcher.sh
879 wget https://launcher.mojang.com/mc-staging/download/Minecraft_staging.deb
880 sudo dpkg -i Minecraft_staging.deb
881 sudo /opt/minecraft-launcher/minecraft-launcher.sh
882 sudo add-apt-repository ppa:webupd8team/java
883 update
884 sudo apt-get install oracle-java8-installer
885 sudo apt-get -f install oracle-java8-installer
886 sagi libicu-dev
887 apt-get -f install
888 sudo apt-get -f install
889 sudo apt-get -f install oracle-java8-installer
890 sudo apt-get -f install
891 sudo apt-get install oracle-java8-set-default
892 sudo apt-get -f install
893 update
894 cd dymo-cups-drivers-1.4.0.5/
895 xdg-open INSTALL
896 ./configure
897 repos misc
898 ls
899 cd ../linux_scripts/
900 ls
901 git pull
902 sudo apt-get install libcups2-dev
903 sudo apt-get install libcupsimage2-dev
904 apt-get install -f
905 sudo apt-get install -f
906 sudo apt-get install libcupsimage2-dev
907 sudo apt-get install libcups2-dev
908 sagi libicu55
909 sudo /opt/minecraft-launcher/minecraft-launcher.sh
910 ./configure
911 make
912 sudo ./configure
913 make
914 make install
915 history
根据以下@Thomas 评论尝试命令:
king@king-MS-7640 ~ $ dpkg -l | grep libicu
ii libicu-dev:amd64 55.1-7ubuntu0.2 amd64 Development files for International Components for Unicode
iU libicu55:amd64 55.1-7 amd64 International Components for Unicode
iF libicu55:i386 55.1-7ubuntu0.2 i386 International Components for Unicode
king@king-MS-7640 ~ $ sudo apt-get purge libicu-dev
[sudo] password for king:
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:
libicu55 : Breaks: libicu55:i386 (!= 55.1-7) but 55.1-7ubuntu0.2 is to be installed
libicu55:i386 : Breaks: libicu55 (!= 55.1-7ubuntu0.2) but 55.1-7 is to be installed
libxml2-dev : Depends: libicu-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
king@king-MS-7640 ~ $ sudo apt-get purge libicu55
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:
brltty : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
calibre-bin : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
icu-devtools : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libcamel-1.2-54 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libcdr-0.1-1 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libdee-1.0-4 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libe-book-0.1-1 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libedataserver-1.2-21 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libharfbuzz-icu0 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libicu-dev : Depends: libicu55 (= 55.1-7ubuntu0.2) but it is not going to be installed
libjavascriptcoregtk-1.0-0 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libjavascriptcoregtk-3.0-0 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libjavascriptcoregtk-4.0-18 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libmspub-0.1-1 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libqt5core5a : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libqt5webkit5 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libreoffice-calc : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libreoffice-core : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libreoffice-writer : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libvisio-0.1-1 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libwebkit2gtk-3.0-25 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libwebkit2gtk-4.0-37 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libwebkitgtk-1.0-0 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libwebkitgtk-3.0-0 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
libxml2 : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
python3-icu : Depends: libicu55 (>= 55.1-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
添加 LS_MESSAGE 命令的输出:
king@king-MS-7640 ~ $ S_MESSAGES=C apt-cache policy libicu55 libicu55:i386 libicu-dev and apt-get install -s libcupsfilters-dev
libicu55:
Installed: 55.1-7
Candidate: 55.1-7ubuntu0.2
Version table:
55.1-7ubuntu0.2 500
500 http://mirror.cogentco.com/pub/linux/ubuntu xenial-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
*** 55.1-7 500
500 http://mirror.cogentco.com/pub/linux/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
libicu55:i386:
Installed: 55.1-7ubuntu0.2
Candidate: 55.1-7ubuntu0.2
Version table:
*** 55.1-7ubuntu0.2 500
500 http://mirror.cogentco.com/pub/linux/ubuntu xenial-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
100 /var/lib/dpkg/status
55.1-7 500
500 http://mirror.cogentco.com/pub/linux/ubuntu xenial/main i386 Packages
libicu-dev:
Installed: 55.1-7ubuntu0.2
Candidate: 55.1-7ubuntu0.2
Version table:
*** 55.1-7ubuntu0.2 500
500 http://mirror.cogentco.com/pub/linux/ubuntu xenial-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
100 /var/lib/dpkg/status
55.1-7 500
500 http://mirror.cogentco.com/pub/linux/ubuntu xenial/main amd64 Packages
and:
Installed: (none)
Candidate: 1.2.2-4.1
Version table:
1.2.2-4.1 500
500 http://mirror.cogentco.com/pub/linux/ubuntu xenial/universe amd64 Packages
N: Unable to locate package apt-get
N: Unable to locate package install
答案1
您下载的初始软件包可能有问题,因此请执行sudo apt-get clean
命令以删除/var/cache/apt/archives
和中所有本地可用的软件包/var/cache/apt/archives/partial
。执行此操作后,您可以安装所需的软件包。由于g++
和gcc
已安装且为最新版本,因此请保留它们。
但在安装所需的软件包之前,请清除以前安装的软件包。请遵循以下命令,尽管它们可能看起来违反直觉,但不要通过删除看似多余的步骤来缩短命令。
sudo apt-get clean
sudo apt-get purge libcups2-dev
sudo apt-get purge libcupsimage2-dev
sudo apt-get update
sudo apt-get install -f
sudo apt-get upgrade
sudo apt-get install libcups2-dev
sudo apt-get install libcupsimage2-dev
sudo apt-get install -f