我使用make-jpkg
该包java-package
创建了一个新的 oracle-java8-jre Debian 包。一切都按预期进行,只是 apt 想要始终更新 Java。有没有一种方法可以apt
识别较新的版本:
:~$ fakeroot make-jpkg jre-8u311-linux-x64.tar.gz
:~$ sudo su -
:~# cp ~user/oracle-java8-jre_8u311_amd64.deb .
:~# dpkg -i oracle-java8-jre_8u311_amd64.deb
Selecting previously unselected package oracle-java8-jre.
(Reading database ... 76819 files and directories currently installed.)
Preparing to unpack oracle-java8-jre_8u311_amd64.deb ...
Unpacking oracle-java8-jre (8u311) ...
Setting up oracle-java8-jre (8u311) ...
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/ControlPanel to provide /usr/bin/ControlPanel (ControlPanel) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/bin/jcontrol to provide /usr/bin/jcontrol (jcontrol) in auto mode
update-alternatives: using /usr/lib/jvm/oracle-java8-jre-amd64/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
:~# java -version
java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
:~# apt list --upgradable
Listing... Done
oracle-java8-jre/buster 8.162-2 amd64 [upgradable from: 8u311]
:~# apt-cache policy oracle-java8-jre
oracle-java8-jre:
Installed: 8u311
Candidate: 8.162-2
Version table:
8.162-2 500
500 http://my.repo/our-buster buster/main amd64 Packages
*** 8u311 100
100 /var/lib/dpkg/status