Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Homebrew openjdk@8 installation failure on M1 Macs #2551

Closed
Leland opened this issue Apr 7, 2021 · 5 comments
Closed

[BUG] Homebrew openjdk@8 installation failure on M1 Macs #2551

Leland opened this issue Apr 7, 2021 · 5 comments

Comments

@Leland
Copy link

Leland commented Apr 7, 2021

Information

  1. Apktool Version (apktool -version) - N/A
  2. Operating System (Mac, Linux, Windows) - macOS 11.2.3, M1 chip
  3. APK From? (Playstore, ROM, Other) - N/A

Steps to Reproduce

  1. brew install apktool

Output:

$ brew install apktool
==> Downloading https://homebrew.bintray.com/bottles/m4-1.4.18.arm64_big_sur.bottle.1.tar.gz
Already downloaded: /Users/lelandclemmons/Library/Caches/Homebrew/downloads/4b470a01ecb6ff156120cdde7e724d20140ac991221e6de3094b8223e4c33476--m4-1.4.18.arm64_big_sur.bottle.1.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.71.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/lelandclemmons/Library/Caches/Homebrew/downloads/cbc5a82447caab8200a340468767d0f652e04f707412b3679a9e0f857f251b05--autoconf-2.71.arm64_big_sur.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2_3.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/lelandclemmons/Library/Caches/Homebrew/downloads/543cfd61e9f40f8244c8a3cd1ce4966e302327a5d83af48ccd69bc23d773eceb--pkg-config-0.29.2_3.arm64_big_sur.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.37.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/lelandclemmons/Library/Caches/Homebrew/downloads/6d1358d2e6b4577cc280ddaeabc8477ab68982f2faad020d431a31e53faaff26--libpng-1.6.37.arm64_big_sur.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.10.4.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/lelandclemmons/Library/Caches/Homebrew/downloads/acd4c39bf2c08ce6dd74711474e3411292fae2b5db57553d40165231d856bb8a--freetype-2.10.4.arm64_big_sur.bottle.tar.gz
Error: openjdk@8: no bottle available!
You can try to install from source with:
  brew install --build-from-source openjdk@8
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.

From what I can tell, this is because the M1 chip needs it's own special version of OpenJDK – might be worth documenting in the installation instructions for now: https://ibotpeaches.github.io/Apktool/install/

@Leland Leland changed the title [BUG] Homebrew openjdk@8 installation failture [BUG] Homebrew openjdk@8 installation failture on M1 Macs Apr 7, 2021
@Leland Leland changed the title [BUG] Homebrew openjdk@8 installation failture on M1 Macs [BUG] Homebrew openjdk@8 installation failure on M1 Macs Apr 7, 2021
@iBotPeaches
Copy link
Owner

Yeah sorry no idea. Not sure what special things M1 need. Will accept PRs.

@kittizz
Copy link

kittizz commented Apr 26, 2021

@Leland it's working on my Mac mini M1 chip

just try download apktool jar file or build project don't using brew install
and install java 14 from oracle site.

it work for me haha

$ apktool -version
2.5.1-8a8cd6-SNAPSHOT
$ java -version
java version "14.0.2" 2020-07-14
Java(TM) SE Runtime Environment (build 14.0.2+12-46)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)

$ neofetch
                    'c.          kittiza@Kittithats-Mac-mini.local
                 ,xNMM.          ---------------------------------
               .OMMMMo           OS: macOS 11.2.3 20D91 arm64
               OMMM0,            Host: Macmini9,1
     .;loddo:' loolloddol;.      Kernel: 20.3.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 2 days, 12 hours, 13 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 1 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: FiraCode-Retina 13
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M1
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M1
       .cooc,.    .,coo:.        Memory: 2244MiB / 16384MiB




@LukeChannings
Copy link

The Homebrew formula depends on openjdk@8, which isn't available for M1 macs.

However, in my experience installing the latest openjdk (brew install openjdk - make sure it's added to PATH) and following the non-Homebrew installation instructions from https://ibotpeaches.github.io/Apktool/install/ works fine.

What I take away from this is that apktool can work fine with openjdk 16, and the homebrew formula could probably be updated to reflect that.

@iBotPeaches
Copy link
Owner

It appears this is related to the forced lock on openjdk8 as mentioned above. I don't have the knowledge with homebrew to know if you can create various allowed JDKs versions, like a composer package that could work with guzzle5 or 6.

So I'll just link the formula https://github.com/Homebrew/homebrew-core/blob/master/Formula/apktool.rb and close this. The issue appears to be a 3rd party formula and I don't have the homebrew knowledge to know proper fix.

@Pointy
Copy link

Pointy commented Oct 6, 2022

Note that JDK 8 is required for a lot of projects. Substituting a newer JDK may be not an option for many projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants