0

I was trying to install flex bison so i used the command

sudo apt install flex bison

in my mac but it appears the error

The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt. 
Please visit http://www.java.com for information on installing Java.

the i insert the command

java -version

to make sure i have java installed and it appears

java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

so i don´t know what else i can do to try to install flex bison

  • 1
    Mac OS X doesn't have apt-get. Please check below link: https://stackoverflow.com/questions/19688424/why-is-the-apt-get-function-not-working-in-the-terminal-on-mac-os-x-v10-9-maver#:~:text=Mac%20OS%20X%20doesn't,Homebrew%20that%20is%20used%20instead.&text=Use%20Homebrew%20to%20install%20packages,otherwise%20use%20apt%2Dget%20for. – Rafailo Apr 06 '22 at 09:41
  • Why is this tagged as a C Question? It even says java in the question's Body. – cediwelli Apr 06 '22 at 09:43
  • @Cediwelli Likely because OP is trying to write some parser in C. Java shows up because macOS simply don't support apt-get – Martheen Apr 06 '22 at 09:45
  • The error message is probably related to this "apt": https://docs.oracle.com/javase/7/docs/technotes/guides/apt/GettingStarted.html#what-is-apt - which is of course not Debian's apt-get – JeffRSon Apr 06 '22 at 09:48
  • Thanks to @all for the help sry i was used to work with linux didn't know that – jaimevidex Apr 06 '22 at 14:13

0 Answers0