首先,我是 ubuntu 的菜鸟。我需要运行一个 Java 应用程序并安装了最新版本。之后,尝试运行 .jar 文件,成功了,但当我尝试运行已安装的文件时,它们给我一个错误,说应用程序是 32 位的,而我的 java(和 ubuntu)安装是 64 位的。在谷歌上搜索了一段时间后,我发现我需要安装 icedtea。尝试这样做,但没有成功。
sudo apt-get clean
sudo apt-get autoremove
给我
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:
icedtea-6-plugin:i386 : Depends: icedtea-netx:i386 (= 1.5-1ubuntu1) but it is not installable
E: Unmet dependencies. Try using -f.
然后尝试
sudo apt-get -f autoremove
并让我回归
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
icedtea-netx:i386
The following NEW packages will be installed:
icedtea-netx:i386
0 upgraded, 1 newly installed, 0 to remove and 55 not upgraded.
1 not fully installed or removed.
Need to get 19,5 kB of archives.
After this operation, 155 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http:// ec. archive. ubuntu. com/ ubuntu/ trusty/main icedtea-netx i386 1.5-1ubuntu1 [19,5 kB]
Fetched 19,5 kB in 15s (1.231 B/s)
(Reading database ... 187313 files and directories currently installed.)
Preparing to unpack .../icedtea-netx_1.5-1ubuntu1_i386.deb ...
Unpacking icedtea-netx:i386 (1.5-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/icedtea-netx_1.5-1ubuntu1_i386.deb (--unpack):
trying to overwrite shared '/usr/bin/policyeditor', which is different from other instances of package icedtea-netx:i386
Errors were encountered while processing:
/var/cache/apt/archives/icedtea-netx_1.5-1ubuntu1_i386.deb
W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ trusty/partner amd64 Packages (/var/lib/apt/lists/archive. canonical. com_ubuntu_dists_trusty_partner_binary-amd64_Packages)
W: Duplicate sources.list entry http:// archive. canonical. com /ubuntu/ trusty/partner i386 Packages (/var/lib/apt/lists/archive. canonical .com_ ubuntu_dists_trusty_partner_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
E: Sub-process /usr/bin/dpkg returned an error code (1)
(由于我无法像从终端复制的那样发布它,因此在链接中添加了一些空格)
尝试过
sudo apt-get update
还是同样的问题。
关于如何通过控制台删除此包及其依赖项,您有什么想法吗?或者,如果不可能,如何手动删除它们?
提前致谢!Pablo
答案1
尝试这个
sudo-i
dpkg -i --force-overwrite /var/cache/apt/archives/icedtea-netx_1.5-1ubuntu1_i386.deb apt-get autoremove apt-get update apt-get upgrade
答案2
它清楚地说“sudo apt-get -f install”,但之后没有任何提示。这将自动清除不需要的软件包,然后您就可以开始了。相信我,它对我有用。