termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.09k stars 3k forks source link

[Bug]: Can't install openjdk-19 #15212

Closed crat1985 closed 1 year ago

crat1985 commented 1 year ago

Problem description

Error while installing openjdk-19 in Termux from https://github.com/termux/termux-packages/actions/runs/4163778931 : image

What steps will reproduce the bug?

Download openjdk-19 for aarch64 from https://github.com/termux/termux-packages/actions/runs/4163778931 and extract it. Finally do dpkg -i openjdk-19* in the extracted folder

What is the expected behavior?

OpenJDK should install properly.

System information

termux-info:

Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
Updatable packages:
webkit2gtk-4.1/x11 2.38.5 aarch64 [upgradable from: 2.38.4]
termux-tools version:
1.37.0
Android version:
11
Kernel build information:
Linux localhost 4.14.190-perf-gceaf914a4ae1-dirty #2 SMP PREEMPT Wed Feb 16 22:34:35 WIB 2022 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 8
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
agnostic-apollo commented 1 year ago

postinst error would be related to https://github.com/termux/termux-packages/pull/15108#issuecomment-1431939273

And don't use openjdk-19*. First install openjdk-19_19.0_aarch64.deb and then optionally openjdk-19-x_19.0_aarch64.deb if X11 related stuff is required, since later depends on former and former must be installed first.

crat1985 commented 1 year ago

Okay thanks I'll try :)

crat1985 commented 1 year ago

@agnostic-apollo When I execute postinst, I get this error :

./postinst: 6: Syntax error: word unexpected (expecting "do")
Grimler91 commented 1 year ago

Next build from https://github.com/termux/termux-packages/pull/15108 should™ have working postinst scripts, if you want to try it before you have to remove the script, for example following instructions in https://stackoverflow.com/a/47852901 (but without sudo)

This will also cause binaries to not be in PATH, so you would have to add $PREFIX/lib/jvm/openjdk-19-java/bin to PATH to find java and friends.

crat1985 commented 1 year ago

Ok thanks I'll try that right now !

crat1985 commented 1 year ago

It worked !

Grimler91 commented 1 year ago

Great, please let us know if there are any issues with openjdk-19!

AlirezaParsi commented 1 year ago

i want openjdk19 too how i get it? if you have any link of that deb file please give me i have to download 300MB file? ):