尝试在最新版本的 Ubuntu (1:18.04.11.12) 上使用下面的一系列命令启动基于 Java 的 Etrade Pro (etpro_launch.jnlp) 后IcedTea-8 无法运行任何 jnlp 应用程序(可能是由于 openjdk-11?),失败了,我试图撤销整个操作,但还是失败了。我该怎么做才能撤销这些命令(释放“pins”),或者安装 Java 来启动用 Java 编写的 Etrade Pro?我想我似乎无法撤销 pin/hold 命令。谢谢。
sudo apt purge oracle-java11-* -y
sudo apt purge *openjdk* -y
sudo apt autoremove --purge -y
wget http://mirrors.kernel.org/ubuntu/pool/main/o/openjdk-8/openjdk-8-jre-headless_8u222-b10-1ubuntu1~16.04.1_amd64.deb
sudo apt install -y ./openjdk-8-jre-headless_8u222-b10-1ubuntu1~16.04.1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
sudo apt install -y ./libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/o/openjdk-8/openjdk-8-jre_8u222-b10-1ubuntu1~16.04.1_amd64.deb
sudo apt install -y ./openjdk-8-jre_8u222-b10-1ubuntu1~16.04.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/i/icedtea-web/icedtea-netx-common_1.6.2-3ubuntu1_all.deb
sudo apt install -y ./icedtea-netx-common_1.6.2-3ubuntu1_all.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/i/icedtea-web/icedtea-netx_1.6.2-3ubuntu1_amd64.deb
sudo apt install -y ./icedtea-netx_1.6.2-3ubuntu1_amd64.deb
Also we need to pin/hold the versions of such packages with single long command below:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-java8
Package: icedtea-netx
Pin: version 1.6.2-3ubuntu1
Pin-Priority: 1337
Package: icedtea-netx-common
Pin: version 1.6.2-3ubuntu1
Pin-Priority: 1337
Package: openjdk-8-jre
Pin: version 8u222-b10-1ubuntu1~16.04.1
Pin-Priority: 1337
Package: openjdk-8-jre-headless
Pin: version 8u222-b10-1ubuntu1~16.04.1
Pin-Priority: 1337
EOF
答案1
使用以下命令删除锁/密码文件:
sudo rm /etc/apt/preferences.d/pin-java8
然后:
升级手动安装的软件包
sudo apt-get update sudo apt-get dist-upgrade
或删除它们
sudo apt-get purge icedtea-netx icedtea-netx-common openjdk-8-jre openjdk-8-jre-headless