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

"The formula cannot be installed from the bottle" #9

Open
aradalvand opened this issue Sep 8, 2023 · 4 comments
Open

"The formula cannot be installed from the bottle" #9

aradalvand opened this issue Sep 8, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@aradalvand
Copy link

aradalvand commented Sep 8, 2023

Hi there. I'm trying to install Bun on WSL2 Ubuntu 22.04 using Homebrew and I keep getting this error:

image

I have pruned Homebrew's cache and untapped/retapped the tap multiple times but to no avail.
I can't seem to figure out what's wrong here. Shouldn't it just work?

@Electroid Electroid added the bug Something isn't working label Sep 8, 2023
@Electroid
Copy link
Contributor

The good news is that it appears to be downloading the right asset from Github.

Could you run the following command, to see if there's any extra logs? (-vd should enable verbose & debug logs)

brew install -vd bun 2>&1 | tee install.log

@aradalvand
Copy link
Author

aradalvand commented Sep 8, 2023

@Electroid Thanks for the quick response.

The good news is that it appears to be downloading the right asset from Github.

Yeah that's what makes it weird :/

Could you run the following command, to see if there's any extra logs? (-vd should enable verbose & debug logs)
brew install -vd bun 2>&1 | tee install.log

Sure, here's the full output of that command:

Running `brew update --auto-update`...
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/oven-sh/homebrew-bun/Formula/bun.rb
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading glibc from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading [email protected] from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading gcc from API
/usr/bin/env /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/shared/git --version
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading gmp from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading m4 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading isl from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading libmpc from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading mpfr from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading zstd from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading lz4 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading xz from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading cmake from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading openssl@3 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading ca-certificates from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading ncurses from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading pkg-config from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading gpatch from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading zlib from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading binutils from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading bzip2 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading bison from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading unzip from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading zip from API
/usr/bin/env /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Linuxbrew/4.1.10\ \(Linux\;\ x86_64\ Ubuntu\ 22.04.2\ LTS\)\ curl/7.81.0 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://github.com/oven-sh/bun/releases/download/bun-v0.8.1/bun-linux-x64.zip
==> Fetching oven-sh/bun/bun
/usr/bin/env /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Linuxbrew/4.1.10\ \(Linux\;\ x86_64\ Ubuntu\ 22.04.2\ LTS\)\ curl/7.81.0 --header Accept-Language:\ en --fail --silent --retry 3 --remote-time --output /home/arad/.cache/Homebrew/downloads/819c9044390433362a2e61126a1895235c9e2ea9f6ee4bbf39641f24c02470a5--bun-linux-x64.zip.incomplete --location https://objects.githubusercontent.com/github-production-release-asset-2e65be/357728969/a39b9354-a2c2-44a1-a3b5-2924c18d5446\?X-Amz-Algorithm=AWS4-HMAC-SHA256\&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A\%2F20230908\%2Fus-east-1\%2Fs3\%2Faws4_request\&X-Amz-Date=20230908T004937Z\&X-Amz-Expires=300\&X-Amz-Signature=1af4dfa77724cb83f4d27008f74e73cc83a2cde7f0791d63afb4a187e350e63e\&X-Amz-SignedHeaders=host\&actor_id=0\&key_id=0\&repo_id=357728969\&response-content-disposition=attachment\%3B\%20filename\%3Dbun-linux-x64.zip\&response-content-type=application\%2Foctet-stream
==> Downloading https://github.com/oven-sh/bun/releases/download/bun-v0.8.1/bun-linux-x64.zip
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/357728969/a39b9354-a2c2-44a1-a3b5-2924c18d5446?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230908T004937Z&X-Amz-Expires=300&X-Amz-Signature=1af4dfa77724cb83f4d27008f74e73cc83a2cde7f0791d63afb4a187e350e63e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=357728969&response-content-disposition=attachment%3B%20filename%3Dbun-linux-x64.zip&response-content-type=application%2Foctet-stream
Error: The following formula cannot be installed from bottle and must be
built from source.
  bun
Install Clang or run `brew install gcc`.
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:403:in `install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/upgrade.rb:218:in `install_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:358:in `install_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:303:in `block in install_formulae'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:302:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:302:in `install_formulae'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:295:in `install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:94:in `<main>'
==> Verifying checksum for '819c9044390433362a2e61126a1895235c9e2ea9f6ee4bbf39641f24c02470a5--bun-linux-x64.zip'
==> Installing bun from oven-sh/bun

I'm also on the latest version of Homebrew:

image

@aradalvand
Copy link
Author

Needless to say I can install other formulae just fine:

image

@nApucco
Copy link

nApucco commented Feb 8, 2024

I solved the issue of "The formula cannot be installed from the bottle and must be built from source." and "Install Clang or run brew install gcc." with the following steps:

  • Properly install the necessary build tools as required by Homebrew: https://docs.brew.sh/Homebrew-on-Linux#requirements
    • sudo apt-get install build-essential procps curl file git
  • If this is not enough: Installing/Reinstalling GCC in Homebrew
    • brew reinstall gcc or potentially just brew postinstall gcc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants