Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Can't install JRE #495

Closed
UnsafePointer opened this issue Oct 29, 2020 · 8 comments
Closed

Can't install JRE #495

UnsafePointer opened this issue Oct 29, 2020 · 8 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@UnsafePointer
Copy link

I can't install adoptopenjdk8-jre, adoptopenjdk8 installs just fine.

Mac-mini:~ anka$ brew cask install adoptopenjdk8
==> Downloading https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jdk_x64_mac_ho
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/140418865/2bb85600-1550-11eb-994e-10
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'adoptopenjdk8'.
==> Installing Cask adoptopenjdk8
==> Running installer for adoptopenjdk8; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
installer: Package name is AdoptOpenJDK
installer: Upgrading at base path /
installer: The upgrade was successful.
package-id: net.adoptopenjdk.8.jdk
version: 1.0
volume: /
location: 
install-time: 1603985947
🍺  adoptopenjdk8 was successfully installed!
Mac-mini:~ anka$ brew cask install adoptopenjdk8-jre
==> Downloading https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jre_x64_mac_ho
Already downloaded: /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
==> Verifying SHA-256 checksum for Cask 'adoptopenjdk8-jre'.
==> Installing Cask adoptopenjdk8-jre
==> Running installer for adoptopenjdk8-jre; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
installer: Package name is AdoptOpenJDK
installer: Upgrading at base path /
installer: The upgrade was successful.
No receipt for 'net.adoptopenjdk.8.jre' found at '/'.
==> Purging files for version 8,272:b10 of Cask adoptopenjdk8-jre
Error: Failure while executing; `/usr/sbin/pkgutil --pkg-info net.adoptopenjdk.8.jre` exited with 1. Here's the output:
No receipt for 'net.adoptopenjdk.8.jre' found at '/'.
Full logs
Mac-mini:~ anka$ brew cask --debug install adoptopenjdk8-jre
==> Cask::Installer#install
==> Printing caveats
==> Cask::Installer#fetch
==> Downloading
==> Downloading https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jre_x64_mac_ho
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.5.6\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.7\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --silent --head --request GET https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
Already downloaded: /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
/usr/bin/xattr -p com.apple.quarantine /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
==> /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg is quarantined
==> Downloaded to -> /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
==> Verifying SHA-256 checksum for Cask 'adoptopenjdk8-jre'.
==> Installing Cask adoptopenjdk8-jre
==> Cask::Installer#stage
==> Extracting primary container
==> Using container class UnpackStrategy::Pkg for /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
==> Verifying Gatekeeper status of /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
/usr/bin/xattr -p com.apple.quarantine /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
==> /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg is quarantined
==> Propagating quarantine from /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg to /usr/local/Caskroom/adoptopenjdk8-jre/8,272:b10
/usr/bin/xattr -p com.apple.quarantine /Users/anka/Library/Caches/Homebrew/downloads/c93454eec3ee27622238da5208b60ea908751e2afd881074d105bed466942631--OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg
/usr/bin/xargs -0 -- /bin/chmod -h u\+w
/usr/bin/xargs -0 -- /usr/bin/xattr -w com.apple.quarantine 0181\;5f9adff0\;Homebrew\\x20Cask\;3740D210-0D56-4D89-BD8B-D54A6458DC25
==> Creating metadata directory /usr/local/Caskroom/adoptopenjdk8-jre/.metadata/8,272:b10/20201029154543.036.
==> Creating metadata subdirectory /usr/local/Caskroom/adoptopenjdk8-jre/.metadata/8,272:b10/20201029154543.036/Casks.
==> Installing artifacts
==> 3 artifact/s defined
#<SortedSet: {#<Cask::Artifact::Uninstall:0x00007f93ebbac620 @cask=#<Cask::Cask:0x00007f93ebcd6de8 @token="adoptopenjdk8-jre", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb>, @tap=#<Tap:0x00007f93ebcce6c0 @user="adoptopenjdk", @repo="openjdk", @name="adoptopenjdk/openjdk", @full_name="adoptopenjdk/homebrew-openjdk", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks>>, @block=#<Proc:0x00007f93ebcd6d48@/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb:2>, @default_config=#<Cask::Config:0x00007f93ebcc62b8 @explicit={}>, @caskroom_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre/.metadata>, @config=#<Cask::Config:0x00007f93ebbaf618 @explicit={}>, @dsl=#<Cask::DSL:0x00007f93ebbaf2a8 @cask=#<Cask::Cask:0x00007f93ebcd6de8 ...>, @token="adoptopenjdk8-jre", @version="8,272:b10", @sha256="d19e085a5a196411a2ff51762ee19c8d285728c983497dd83116960f32dc47e1", @url=#<URL:0x00007f93ebbaec40 @uri=#<URI::HTTPS https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @appcast=#<Cask::DSL::Appcast:0x00007f93ebbae510 @uri=#<URI::HTTPS https://github.com/adoptopenjdk/openjdk8-binaries/releases/latest>, @parameters={}>, @name=["AdoptOpenJDK 8 (JRE)"], @desc="AdoptOpenJDK OpenJDK (Java) Development Kit", @homepage="https://adoptopenjdk.net/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre/8,272:b10>, @language=nil>>, @directives={:pkgutil=>"net.adoptopenjdk.8.jre", :signal=>[]}>, #<Cask::Artifact::Pkg:0x00007f93ebbadbb0 @cask=#<Cask::Cask:0x00007f93ebcd6de8 @token="adoptopenjdk8-jre", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb>, @tap=#<Tap:0x00007f93ebcce6c0 @user="adoptopenjdk", @repo="openjdk", @name="adoptopenjdk/openjdk", @full_name="adoptopenjdk/homebrew-openjdk", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks>>, @block=#<Proc:0x00007f93ebcd6d48@/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb:2>, @default_config=#<Cask::Config:0x00007f93ebcc62b8 @explicit={}>, @caskroom_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre/.metadata>, @config=#<Cask::Config:0x00007f93ebbaf618 @explicit={}>, @dsl=#<Cask::DSL:0x00007f93ebbaf2a8 @cask=#<Cask::Cask:0x00007f93ebcd6de8 ...>, @token="adoptopenjdk8-jre", @version="8,272:b10", @sha256="d19e085a5a196411a2ff51762ee19c8d285728c983497dd83116960f32dc47e1", @url=#<URL:0x00007f93ebbaec40 @uri=#<URI::HTTPS https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @appcast=#<Cask::DSL::Appcast:0x00007f93ebbae510 @uri=#<URI::HTTPS https://github.com/adoptopenjdk/openjdk8-binaries/releases/latest>, @parameters={}>, @name=["AdoptOpenJDK 8 (JRE)"], @desc="AdoptOpenJDK OpenJDK (Java) Development Kit", @homepage="https://adoptopenjdk.net/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre/8,272:b10>, @language=nil>>, @path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre/8,272:b10/OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg>, @stanza_options={}>, #<Cask::Artifact::PostflightBlock:0x00007f93ebbac9e0 @cask=#<Cask::Cask:0x00007f93ebcd6de8 @token="adoptopenjdk8-jre", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb>, @tap=#<Tap:0x00007f93ebcce6c0 @user="adoptopenjdk", @repo="openjdk", @name="adoptopenjdk/openjdk", @full_name="adoptopenjdk/homebrew-openjdk", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks>>, @block=#<Proc:0x00007f93ebcd6d48@/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb:2>, @default_config=#<Cask::Config:0x00007f93ebcc62b8 @explicit={}>, @caskroom_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre/.metadata>, @config=#<Cask::Config:0x00007f93ebbaf618 @explicit={}>, @dsl=#<Cask::DSL:0x00007f93ebbaf2a8 @cask=#<Cask::Cask:0x00007f93ebcd6de8 ...>, @token="adoptopenjdk8-jre", @version="8,272:b10", @sha256="d19e085a5a196411a2ff51762ee19c8d285728c983497dd83116960f32dc47e1", @url=#<URL:0x00007f93ebbaec40 @uri=#<URI::HTTPS https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @appcast=#<Cask::DSL::Appcast:0x00007f93ebbae510 @uri=#<URI::HTTPS https://github.com/adoptopenjdk/openjdk8-binaries/releases/latest>, @parameters={}>, @name=["AdoptOpenJDK 8 (JRE)"], @desc="AdoptOpenJDK OpenJDK (Java) Development Kit", @homepage="https://adoptopenjdk.net/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/adoptopenjdk8-jre/8,272:b10>, @language=nil>>, @directives={:postflight=>#<Proc:0x00007f93ebbaca80@/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb:15>}>}>
==> Installing artifact of class Cask::Artifact::Pkg
==> Running installer for adoptopenjdk8-jre; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
/usr/bin/sudo -E -- /usr/bin/env LOGNAME=anka USER=anka USERNAME=anka /usr/sbin/installer -pkg /usr/local/Caskroom/adoptopenjdk8-jre/8,272:b10/OpenJDK8U-jre_x64_mac_hotspot_8u272b10.pkg -target /
installer: Package name is AdoptOpenJDK
installer: Upgrading at base path /
installer: The upgrade was successful.
==> Installing artifact of class Cask::Artifact::PostflightBlock
/usr/sbin/pkgutil --pkg-info net.adoptopenjdk.8.jre
No receipt for 'net.adoptopenjdk.8.jre' found at '/'.
==> Purging files for version 8,272:b10 of Cask adoptopenjdk8-jre
Error: Failure while executing; `/usr/sbin/pkgutil --pkg-info net.adoptopenjdk.8.jre` exited with 1. Here's the output:
No receipt for 'net.adoptopenjdk.8.jre' found at '/'.

/usr/local/Homebrew/Library/Homebrew/system_command.rb:192:in `assert_success!'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:59:in `run!'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:35:in `run'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:39:in `run!'
/usr/local/Homebrew/Library/Homebrew/cask/dsl/base.rb:21:in `system_command'
/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk/Casks/adoptopenjdk8-jre.rb:16:in `block (2 levels) in load'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:44:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:44:in `abstract_phase'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:27:in `install_phase'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:219:in `block in install_artifacts'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:777:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:777:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:212:in `install_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:104:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:73:in `block in install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:72:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:72:in `install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:37:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:95:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:186:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:14:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
Mac-mini:~ anka
@karianna karianna modified the milestone: October 2020 Oct 29, 2020
@karianna karianna added question Further information is requested bug Something isn't working and removed question Further information is requested labels Oct 29, 2020
@alexs77
Copy link

alexs77 commented Oct 30, 2020

It's not just about adoptopenjdk8-jre - some versions work.

Working:

  • adoptopenjdk11-jre
  • adoptopenjdk12-jre
  • adoptopenjdk12-openj9-jre
  • adoptopenjdk12-openj9-jre-large
  • adoptopenjdk13-jre
  • adoptopenjdk13-openj9-jre
  • adoptopenjdk13-openj9-jre-large
  • adoptopenjdk14-jre
  • adoptopenjdk14-openj9-jre
  • adoptopenjdk14-openj9-jre-large
  • adoptopenjdk15-openj9-jre

Not working:

  • adoptopenjdk-jre
  • adoptopenjdk-openj9-jre-large
  • adoptopenjdk11-openj9-jre
  • adoptopenjdk15-jre
  • adoptopenjdk15-openj9-jre-large
  • adoptopenjdk8-jre
  • adoptopenjdk8-openj9-jre
  • adoptopenjdk8-openj9-jre-large

@aahlenst
Copy link
Contributor

Confirmed. Problem seems to be specific to Homebrew. I could install the affected versions I tested as PKGs without problems.

@Cabbagec
Copy link

Cabbagec commented Nov 14, 2020

I think the problem might lie in changes happening in packaging, not necessarily something in homebrew.

In my case, I upgraded the adoptopenjdk8-openj9-jre, ended up with the same error. Found that the package changed its name from net.adoptopenjdk.8.jre to net.adoptopenjdk.8.jdk, thus pkgutil failed to find its path.

And I also noticed that even the installation process ended with that error, the files had actually already been copied to /Library/Java/JavaVirtualMachines, and you could use them with some dirty hack in your $PATH environment variable. Further more, pkgutil --pkg-info net.adoptopenjdk.8.jdk returned fine, although the version and location were not properly configured:

$> pkgutil --pkg-info net.adoptopenjdk.8-openj9.jdk
package-id: net.adoptopenjdk.8-openj9.jdk
version: 1.0
volume: /
location:
install-time: 1605263920

I think the "correct" way to install it should also involve configuring these stub "java*" binaries in /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/. So when I run java now, these stubs will just ask me to install java. Other than that, I'm not very familiar with macOS packaging details. Would be appreciated if someone could find ways to fix these stubs.


EDIT:
Oh ok, turns out now they have changed the package name accordingly. Everything works find now!

@aahlenst
Copy link
Contributor

So, indeed the JREs were packaged as JDKs as part of the October quarterly patch update. adoptium/installer@3e18221 apparently fixed the problem. Because of the 8u275 and 11.0.9.1 releases, some packages were built with the fix and are okay now.

@gdams We need to repackage 11.0.9 JRE with OpenJ9 and 15.0.1 JRE with Hotspot and OpenJ9. Then we should be good.

@aahlenst
Copy link
Contributor

I think the "correct" way to install it should also involve configuring these stub "java*" binaries in /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/. So when I run java now, these stubs will just ask me to install java. Other than that, I'm not very familiar with macOS packaging details. Would be appreciated if someone could find ways to fix these stubs.

The commands are present on a freshly installed macOS (at least it's the case in 10.15) even if no JDK is installed. If you run java, you get prompted to install a JDK. As soon as you install any JDK that installs into the standard location (/Library/Java/JavaVirtualMachines), it's picked up.

@karianna karianna added this to the November 2020 milestone Nov 23, 2020
@karianna
Copy link
Member

@gdams has kicked this off.

@gdams
Copy link
Member

gdams commented Dec 1, 2020

respins have been completed, binaries will appear shortly

@gdams gdams closed this as completed Dec 1, 2020
@karianna karianna modified the milestones: November 2020, December 2020 Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants