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

Cannot run program "objcopy": error=2, No such file or directory #135

Closed
rememberber opened this issue Dec 8, 2021 · 3 comments
Closed

Comments

@rememberber
Copy link

On Ubuntu
When I try to package
Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory

full logs:

[INFO] Dependencies copied to /home/bob/IdeaProjects/MooInfo/target/MooInfo/libs!
[INFO]
[INFO] Creating runnable JAR...
[INFO] Runnable jar created in /home/bob/IdeaProjects/MooInfo/target/MooInfo-1.0.0-runnable.jar!
[INFO]
[INFO] Bundling JRE ... with /home/bob/.jdks/openjdk-17.0.1
[INFO] Creating customized JRE ...
[INFO] Getting required modules ...
[INFO] Required modules found: [ALL-MODULE-PATH]
[INFO]
[INFO] Creating JRE with next modules included: ALL-MODULE-PATH
[INFO] Using /home/bob/.jdks/openjdk-17.0.1/jmods modules directory
[INFO] Executing command: /bin/sh -c cd '/home/bob/IdeaProjects/MooInfo/.' && '/home/bob/.jdks/openjdk-17.0.1/bin/jlink' --module-path /home/bob/.jdks/openjdk-17.0.1/jmods --add-modules ALL-MODULE-PATH --output /home/bob/IdeaProjects/MooInfo/target/MooInfo/jre --no-header-files --no-man-pages --strip-debug --compress=2
[INFO] WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
[INFO] Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.479 s
[INFO] Finished at: 2021-12-08T09:11:01+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.github.fvarrui:javapackager:1.6.2:package (bundling-for-linux) on project MooInfo: Command execution failed: /home/bob/.jdks/openjdk-17.0.1/bin/jlink --module-path /home/bob/.jdks/openjdk-17.0.1/jmods --add-modules ALL-MODULE-PATH --output /home/bob/IdeaProjects/MooInfo/target/MooInfo/jre --no-header-files --no-man-pages --strip-debug --compress=2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@fvarrui
Copy link
Owner

fvarrui commented Dec 8, 2021

Hi @rememberber!
Is "objcopy" command available in your system?

@rememberber
Copy link
Author

@fvarrui Thank you for your warm reminder, I solved it by "apt-get install binutils"

@fvarrui
Copy link
Owner

fvarrui commented Dec 8, 2021

Great! Happy to help you 😃

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

2 participants