Skip to content

kafka-gitopts via homebrew : look for java in JAVA_HOME ? #98

Open

Description

@karawitan

Hello,

Looks like the kafka-gitops depends on openjdk;
But kafka-gitops should not point at a specific java version;
Maybe you can use JAVA_HOME, as defined by homebrew ?

brew install kafka-gitops
Running `brew update --auto-update`...

(...)

==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/236228216/52467080-7181-11eb-96e0-38a372bc20f3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230104%2Fus-east-1%2Fs3%2Faws4_requ
######################################################################## 100.0%
==> Installing kafka-gitops from devshawn/kafka-gitops
🍺  /opt/homebrew/Cellar/kafka-gitops/0.2.14: 3 files, 13MB, built in 1 second

(...)

m1:~ kalou$ cd
m1:~ kalou$ kafka-gitops
/opt/homebrew/bin/kafka-gitops: line 8: /opt/homebrew/Cellar/openjdk/19/bin/java: No such file or directory
/opt/homebrew/bin/kafka-gitops: line 8: exec: /opt/homebrew/Cellar/openjdk/19/bin/java: cannot execute: No such file or directory

m1:~ kalou$ echo $JAVA_HOME
/opt/homebrew/Cellar/openjdk/19

m1:~ kalou$ brew list | grep jdk
openjdk
m1:~ kalou$ ls -ld /opt/homebrew/Cellar/openjdk/*/bin
drwxr-xr-x  31 kalou  staff  992 Sep 13 16:16 /opt/homebrew/Cellar/openjdk/19.0.1/bin

Activity

  1. changed the title [-]kafka-gitopts via homebrew : needs dependency upon java[/-] [+]kafka-gitopts via homebrew : openjdk dependency[/+] on Jan 4, 2023
  2. changed the title [-]kafka-gitopts via homebrew : openjdk dependency[/-] [+]kafka-gitopts via homebrew : look for java in JAVA_HOME ?[/+] on Jan 4, 2023
  3. joschi commented on Jan 16, 2023

    @joschi

    @karawitan As you can see in the output you've posted, your JAVA_HOME environment variable is incorrect.

    m1:~ kalou$ echo $JAVA_HOME
    /opt/homebrew/Cellar/openjdk/19
    
    m1:~ kalou$ brew list | grep jdk
    openjdk
    m1:~ kalou$ ls -ld /opt/homebrew/Cellar/openjdk/*/bin
    drwxr-xr-x  31 kalou  staff  992 Sep 13 16:16 /opt/homebrew/Cellar/openjdk/19.0.1/bin
    

    After setting JAVA_HOME to the correct directory (/opt/homebrew/Cellar/openjdk/19.0.1), it should work.

    If the JAVA_HOME environment variable does not exist, it should work as long as java is on your PATH.

    https://github.com/devshawn/kafka-gitops/blob/0.2.15/stub.sh#L5-L7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions