![如何撤消一系列无法与 etpro_launch.jnlp 协同工作的命令,并将其恢复到之前的状态?](https://linux22.com/image/1017925/%E5%A6%82%E4%BD%95%E6%92%A4%E6%B6%88%E4%B8%80%E7%B3%BB%E5%88%97%E6%97%A0%E6%B3%95%E2%80%8B%E2%80%8B%E4%B8%8E%20etpro_launch.jnlp%20%E5%8D%8F%E5%90%8C%E5%B7%A5%E4%BD%9C%E7%9A%84%E5%91%BD%E4%BB%A4%EF%BC%8C%E5%B9%B6%E5%B0%86%E5%85%B6%E6%81%A2%E5%A4%8D%E5%88%B0%E4%B9%8B%E5%89%8D%E7%9A%84%E7%8A%B6%E6%80%81%EF%BC%9F.png)
尝试在最新版本的 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