Score:0

installing HomeBrew in Ubuntu error with portable ruby

cn flag

I have tried to install HomeBrew with:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

and I got this massage:

==> Found cURL: /snap/bin/curl
==> Setting HOMEBREW_DEVELOPER to use Git/cURL not in /usr/bin
==> Checking for `sudo` access (which may request your password).
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chown -R ahmed:ahmed /home/linuxbrew/.linuxbrew/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at a6959e4fc Merge pull request #12118 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.9155
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:97e639a64dcec285392b53ad804b5334c324f1d2a8bdc2b5087b8bf8051e332f
Warning: Failed to create the file                                                                      
Warning: /home/ahmed/.cache/Homebrew/portable-ruby-2.6.3_2.x86_64_linux.bottle.
Warning: tar.gz.incomplete: Permission denied
                                                                                                     0.0%curl: (23) Failure writing output to destination

==> Downloading https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz
Warning: Failed to create the file                                                                      
Warning: /home/ahmed/.cache/Homebrew/portable-ruby-2.6.3_2.x86_64_linux.bottle.
Warning: tar.gz.incomplete: Permission denied
                                                                                                     0.0%curl: (23) Failure writing output to destination

Error: Failed to download ruby from the following locations:
  - https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:97e639a64dcec285392b53ad804b5334c324f1d2a8bdc2b5087b8bf8051e332f
  - https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz

Do not file an issue on GitHub about this; you will need to figure out for
yourself what issue with your internet connection restricts your access to
GitHub (used for Homebrew updates and binary packages).
Error: Failed to install Homebrew Portable Ruby and cannot find another Ruby 2.6.3!
If there's no Homebrew Portable Ruby available for your processor:
- install Ruby 2.6.3 with your system package manager (or rbenv/ruby-build)
- make it first in your PATH
- try again

Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force --quiet

any solution?

Score:0
cn flag

I have found the solution by downloading portable ruby from :

 https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz

and add it in the:

/home/{username}/.cache/Homebrew/
Score:0
cn flag

In my case, installing curl with apt helped:

sudo apt-get install curl

Even though, I already had curl installed with snap.

To add brew to path, use

echo 'export PATH="/home/linuxbrew/.linuxbrew/bin/brew:$PATH"' >> ~/.bashrc

Then to update brew run

brew update --auto-upgrade
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.