情感 · 2007年12月22日 0

Ubuntu升级软件出错解决办法

升级的时候出了错,出现了如下信息:
sudo: cannot get working directory
正在读取软件包列表… 完成
正在分析软件包的依赖关系树      
Reading state information… 完成     
sun-java5-jdk 已经是最新的版本了。
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。
有 1 个软件包没有被完全安装或卸载。
需要下载 0B 的软件包。
解压缩后会消耗掉 0B 的额外空间。
正在设置 sun-java5-doc (1.5.0-13-0ubuntu1) …
This package is an installer package, it does not actually contain the
J2SDK documentation. You will need to go download one of the
archives:
    jdk-1_5_0-doc.zip jdk-1_5_0-doc-ja.zip
(choose the non-update version if this is the first installation).
Please visit
    http://java.sun.com/j2se/1.5.0/download.html
now and download. The file should be owned by root.root and be copied
to /tmp.
[Press RETURN to try again, ‘no’ + RETURN to abort]

大致意思是:你用的sun-java5-doc这玩意不是一个安装包,你要到sun的网站上下载 jdk-1_5_0-doc.zip包重新安装。
用sudo apt-get –purge remove sun-java5-doc命令先卸载掉这个出错的sun-java5-doc。
然后下载重新安装即可。