Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

471
Vistas
The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt

I am using M1 Mac OS11.5.2.
I've already downloaded zulu.jdk and zulu.jre, in "/Library/Java/JavaVirtualMachines".
I also exported the PATH.

echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.bash_profile

When I type

sudo apt update

I get this:

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.

I hope some kind person could tell me the solution.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

APT is for Linux

APT is for Linux, not macOS. Similarly, BSD has their own tools in Packages and Ports.

Homebrew

You can add a similar package-management tool to macOS developed by a third party: Homebrew.

I have not used Homebrew myself, but some folks are big fans.

Manual installers

To install Java, I use an installer app for macOS from Adoptium or Azul Systems, or from any of the several other vendors providing distributions of Java such as BellSoft, Amazon, Microsoft, Oracle, SAP, Red Hat/IBM, Pivotal, etc.

To update I simply:

  • Delete the existing JDK found in /Library/Java/JavaVirtualMachines.
  • Run a freshly-downloaded installer.

This approach is a manual operation. And this requires the Mac’s admin password.

So for mass updates across many computers I can imagine that shell-scripting with Homebrew would be a better solution. If you’d rather not install Homebrew, some vendors are releasing installers that can controlled by a shell script.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda