swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.98k stars 6.03k forks source link

Unable to install `swagger-codegen` using brew command on Ubuntu #9497

Open joergkrause opened 5 years ago

joergkrause commented 5 years ago

Platform: Ubuntu 18.04

Description

I'm using brew to install swagger-codegen. I installed brew like this:

$ sudo apt install linuxbrew-wrapper

Command line used

$ brew install swagger-codegen

This downloads, tries to install and ends with this message:

==> Downloading https://github.com/swagger-api/swagger-codegen/archive/v3.0.8.tar.gz
Already downloaded: /home/joerg/.cache/Homebrew/downloads/de7a723fbc25009e8afd5558e1be4ed53de8eecd7cf1d08619e49be7d045b3f6--swagger-codegen-3.0.8.tar.gz
Error: An exception occurred within a child process:
  NotImplementedError: NotImplementedError

*Error:* swagger-codegen is not installed, then.

Checks made before

I have openjdk installed:

JAVA_HOME="/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin"
$ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)

Check version of brew:

$ brew -v
Homebrew 2.1.5
Homebrew/linuxbrew-core (git revision b1e9; last commit 2019-06-13)
Steps to reproduce

Have homebrew installed on Ubuntu. Check with brew install hello that's working properly. Than try installing swagger-codegen.

Related issues/PRs

https://github.com/swagger-api/swagger-codegen/issues/7427

xasx commented 5 years ago

It comes from here https://github.com/Homebrew/brew/blob/4354ca10604630462ccdf2ad77c987da76e5f719/Library/Homebrew/language/java.rb#L7

fyang1024 commented 5 years ago

Same here.

ghost commented 4 years ago

@xasx Is there anyway to work around this on Ubuntu?

XilefNori commented 4 years ago

Having the same problem. Ubuntu 18.04.4 LTS

$ uname -a Linux server-home 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ java -version openjdk version "1.8.0_242" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

skroczek commented 4 years ago

Having the same problem. Ubuntu 20.04 LTS

$ uname -a Linux T800 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ java -version openjdk version "1.8.0_242" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

bluewolf26 commented 4 years ago

Same here ... is there a workaround ?

kashifkhan0771 commented 3 years ago

How to install swagger code gen in Ubuntu 20.4?