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

Unable to install on Ubuntu 22.04.3 LTS with JDK 8 #739

Open
Gariscat opened this issue Nov 18, 2023 · 3 comments
Open

Unable to install on Ubuntu 22.04.3 LTS with JDK 8 #739

Gariscat opened this issue Nov 18, 2023 · 3 comments

Comments

@Gariscat
Copy link

Hi!

I was trying to install this package with JDK 8 selected. However, I got the following error, which is identical to some previous issues.

File to patch:
      Skip this patch? [y]
      12 out of 12 hunks ignored
      The text leading up to this was:
      --------------------------
      |diff -u1 -rN MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java MCP-Reborn/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java
      |--- MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java   2022-06-23 00:30:26.691515959 +0100
      |+++ MCP-Reborn/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java   2022-06-23 00:28:27.361515359 +0100
      --------------------------
      File to patch:
      Skip this patch? [y]
      2 out of 2 hunks ignored
      The text leading up to this was:
      --------------------------
      |diff -u1 -rN MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/SaveFormat.java MCP-Reborn/src/main/java/net/minecraft/world/storage/SaveFormat.java
      |--- MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/SaveFormat.java   2022-06-23 00:30:26.691515959 +0100
      |+++ MCP-Reborn/src/main/java/net/minecraft/world/storage/SaveFormat.java   2022-06-23 00:28:27.361515359 +0100
      --------------------------
      File to patch:
      Skip this patch? [y]
      6 out of 6 hunks ignored
      
      FAILURE: Build failed with an exception.
      
      * Where:
      Build file '/tmp/pip-req-build-nrwjn8iv/minerl/MCP-Reborn/build.gradle' line: 44
      
      * What went wrong:
      A problem occurred evaluating root project 'mcprec'.
      > Failed to apply plugin 'net.minecraftforge.gradle.forgedev.patcher'.
         > Failed to validate certificate for https://libraries.minecraft.net/, Most likely cause is an outdated JDK. Try updating at https://adoptopenjdk.net/ To disable this check re-run with -Dnet.minecraftforge.gradle.test_certs=false
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      
      * Get more help at https://help.gradle.org
      
      BUILD FAILED in 1s
      
      FAILURE: Build failed with an exception.
      
      * Where:
      Build file '/tmp/pip-req-build-nrwjn8iv/minerl/MCP-Reborn/build.gradle' line: 44
      
      * What went wrong:
      A problem occurred evaluating root project 'mcprec'.
      > Failed to apply plugin 'net.minecraftforge.gradle.forgedev.patcher'.
         > Failed to validate certificate for https://libraries.minecraft.net/, Most likely cause is an outdated JDK. Try updating at https://adoptopenjdk.net/ To disable this check re-run with -Dnet.minecraftforge.gradle.test_certs=false
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      
      * Get more help at https://help.gradle.org
      
      BUILD FAILED in 536ms
      
      FAILURE: Build failed with an exception.
      
      * Where:
      Build file '/tmp/pip-req-build-nrwjn8iv/minerl/MCP-Reborn/build.gradle' line: 44
      
      * What went wrong:
      A problem occurred evaluating root project 'mcprec'.
      > Failed to apply plugin 'net.minecraftforge.gradle.forgedev.patcher'.
         > Failed to validate certificate for https://libraries.minecraft.net/, Most likely cause is an outdated JDK. Try updating at https://adoptopenjdk.net/ To disable this check re-run with -Dnet.minecraftforge.gradle.test_certs=false
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      
      * Get more help at https://help.gradle.org
      
      BUILD FAILED in 547ms
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-nrwjn8iv/setup.py", line 214, in <module>
          prep_mcp()
        File "/tmp/pip-req-build-nrwjn8iv/setup.py", line 193, in prep_mcp
          raise e
        File "/tmp/pip-req-build-nrwjn8iv/setup.py", line 190, in prep_mcp
          subprocess.check_call('{} downloadAssets'.format(gradlew).split(' '), cwd=workdir)
        File "/home/ca7ax/anaconda3/envs/llm_hgm/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['./gradlew', 'downloadAssets']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

The command I used was pip install git+https://github.com/minerllabs/minerl and my Java version is:

(base) ca7ax@lixinyu:~$ java -version
openjdk version "1.8.0_382"
OpenJDK Runtime Environment (build 1.8.0_382-8u382-ga-1~22.04.1-b05)
OpenJDK 64-Bit Server VM (build 25.382-b05, mixed mode)

Do you have any suggestions? Thanks a lot :)

@Gariscat Gariscat changed the title Unable to install on Ubuntu 22.04.3 LTS Unable to install on Ubuntu 22.04.3 LTS with JDK 8 Nov 18, 2023
@Miffyli
Copy link
Contributor

Miffyli commented Nov 19, 2023

Hey, can you paste the full log? The informative error is usually somewhere closer to beginning. Also check javac -version as well.

@lyh1028
Copy link
Contributor

lyh1028 commented Apr 15, 2024

Have you managed to solve it? I meet the same problem these days. Java and javac version are all 1.8.0_271

@Miffyli
Copy link
Contributor

Miffyli commented Apr 15, 2024

@lyh1028 Make sure you are installing MineRL from the repoistory (the newest one). Older versions (the ones on Pypi) will probably not work because of older libraries and whatnots.

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

3 participants