apt-get install 问题:处理时遇到错误:sun-j2sdk1.6

apt-get install 问题:处理时遇到错误:sun-j2sdk1.6

每次运行 apt-get install 时都会出现以下问题:

例如:安装 python-django-south

...
Unpacking python-django-south (from .../python-django-south_0.5-2_all.deb) ...
Setting up sun-j2sdk1.6 (1.6.0+update22-linux-i586.) ...
update-alternatives: error: alternative path /usr/lib/j2sdk1.6-sun/jre/plugin/amd64/ns7/libjavaplugin_oji.so doesn't exist.
dpkg: error processing sun-j2sdk1.6 (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up python-django-south (0.5-2) ...

Processing triggers for python-support ...
Errors were encountered while processing:
 sun-j2sdk1.6
E: Sub-process /usr/bin/dpkg returned an error code (1)

可能是什么问题?我有 9.10 Ubuntu

答案1

按照以下行:

update-alternatives: error: alternative path /usr/lib/j2sdk1.6-sun/jre/plugin/amd64/ns7/libjavaplugin_oji.so doesn't exist.

您设置的java路径无效。因此,请从终端运行:

sudo update-alternatives --config java

并输入与正确存在的路径相对应的数字java

相关内容