(newbie) Homebrew install failing - homebrew

I'm new to all the dev world and I'm facing problems to install Homebrew in a recently formatted Mac.
macOS Catalina 10.15.4
Xcode cli installed and updated
when running the code from brew.sh (/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)")
I'm getting the following error:
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
HEAD is now at 3247f26a3 Merge pull request #7479 from sjackman/requirements.
==> Tapping homebrew/core.
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 116, done.
remote: Counting objects: 100% (116/116), done.
remote: Compressing objects: 100% (82/82), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF.
fatal: index-pack failed
Error: Failure while executing; git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core exited with 128.
Error: Failure while executing; /usr/local/bin/brew tap homebrew/core exited with 1.
Failed during: /usr/local/bin/brew update --force
==> Installation successful!
When I run brew doctor this is the result:
~ % brew doctor
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 116, done.
remote: Counting objects: 100% (116/116), done.
remote: Compressing objects: 100% (82/82), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error: Failure while executing; git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core exited with 128.
Error: Failure while executing; /usr/local/bin/brew tap homebrew/core exited with 1.
After all that I can't install cask and I'm getting the same error.
Any help would be much appreciated, remembering I'm new to dev world.

Related

Error installing Homebrew onto macOS Catalina 10.15.6

I've tried downloading brew with this link:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
However I'm getting the following error message:
==> Downloading and installing Homebrew...
HEAD is now at 771c961c5 Merge pull request #9001 from tie624/fix_url_missing_param
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (14/14), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
Failed during: /usr/local/bin/brew update --force
Can you try to install it following the instructions on their website ? https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
best,

How to fix Homebrew error "fatal: early EOF"?

I'm trying to install Homebrew on MacOS Catalina.
After running the command on their official webpage I'm getting the following error.
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
Failed during: /usr/local/bin/brew update --force
I was having the same problem with the Mac M1 Big Sur.
The comment above was a big help.
Step 1:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Step 2:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then it failed.
Step 3:
cd /opt/homebrew/library/taps/homebrew
Step 4:
sudo rmdir homebrew-core
Step 5:
git clone https://github.com/Homebrew/homebrew-core /opt/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
I also logged into Github on the browser, not sure if that mattered.
I had the same problem. Thankfully, the above answer put me in the right track. I just had to made changes on step 3, 4, and 5.
Step 1
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Step 2
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Step 3
/usr/local/Homebrew/Library/Taps/homebrew
Step 4
sudo rm -r homebrew-core
Step 5
git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1

subgit timeout waiting for pid file

I have GitLab on docker container and I tried to use SubGit. Synchronization from SVN to Git working good, but I have problem when i try to do git push. I get the following error and the daemon.pid file is deleted from subgit directory.
Delta compression using up to 4 threads.
Total 5 (delta 4), reused 0 (delta 0)
remote:
remote: SubGit ERROR REPORT (SubGit version 3.2.2 ('Bobique') build #3603):
remote:
remote: You've received this message because SubGit (http://subgit.com/) is installed in your repository
remote: and an error that needs to be dealt with has occurred in SubGit translation engine.
remote:
remote: TEMPORARY ERROR:
remote: Failed to launch background translation process: timeout waiting for pid file '/var/opt/gitlab/git-data/repositories/lpp/OA.git/./subgit/daemon.pid'.
remote:
remote: CURRENT STATE:
remote: Both Git and Subversion repository are open for pushes or commits.
remote: Your commit was not committed, but you may retry it.
remote:
remote: TO RECOVER:
remote: A) Address the problem if possible and then retry commit
remote: OR
remote: B) Run on the server
remote: $ subgit uninstall /var/opt/gitlab/git-data/repositories/lpp/OA.git/.
remote:
remote: IMPORTANT: As soon as SubGit is uninstalled, both Git and Subversion repositories
remote: will become open, but no synchronization will take place.
remote:
remote: TO REPORT:
remote: Report an issue at ...
remote: You may find logs on the server at '/var/opt/gitlab/git-data/repositories/lpp/OA.git/./subgit/logs'
remote:
remote: THANK YOU!
error: failed to push some refs to ...
Not all refs have been pushed.
When i run subgit configure/install inside container (docker exec -it container-name bash) then files owner was correct (git) and everything is good now :)

Homebrew is not working anymore

I used to have Homebrew installed, but then at some point it broke, so I tried reinstalling it.
I tried running:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It gave:
-e:70: warning: Insecure world writable dir /usr/local in PATH, mode 040777
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
(I don't know why it says it is installed, running brew gives "zsh: command not found: brew")
So I tried running that:
zsh: command not found: brew
Then I tried running it without brew clean-up. Which executed. I re-ran:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It starts downloading and installing until it gets to this point:
Downloading and installing Homebrew...
remote: Counting objects: 226839, done.
remote: Compressing objects: 100% (59610/59610), done.
remote: Total 226839 (delta 165997), reused 226815 (delta 165979)
Receiving objects: 100% (226839/226839), 52.14 MiB | 135.00 KiB/s, done.
Resolving deltas: 100% (165997/165997), done.
From https://github.com/Homebrew/homebrew
* [new branch] master -> origin/master
warning: unable to access 'bin/.gitattributes': Permission denied
error: unable to create file bin/brew (Permission denied)
fatal: Could not reset index file to revision 'origin/master'.
Failed during: git reset --hard origin/master
Tried adding sudo:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Gives:
Don't run this as root!
I don't know where to go from here. Can someone help me?
Did you restart your terminal after installing zsh? brew is possibly not loaded for zshell. Also you need to add usr/local/ to your $path in .zshrc zsh configuration file should be in the in root ~/.zshrc

Homebrew path issue

How do I fix this path issue? I can't use brew command and I think I previously symlink to wrong location.
Master:~ shaunstanislaus$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Press enter to continue
==> Downloading and Installing Homebrew...
remote: Counting objects: 82368, done.
remote: Compressing objects: 100% (39323/39323), done.
remote: Total 82368 (delta 56782), reused 65301 (delta 42220)
Receiving objects: 100% (82368/82368), 11.68 MiB | 1.59 MiB/s, done.
Resolving deltas: 100% (56782/56782), done.
From https://github.com/mxcl/homebrew
* [new branch] master -> origin/master
HEAD is now at 2ea1a0e smpeg: depends on gtk
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
Master:~ shaunstanislaus$ brew doctor
-bash: /usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
Master:~ shaunstanislaus$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/shaunstanislaus/Library/Application Support/GoodSync:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/Users/shaunstanislaus/.ec2/bin:/Users/shaunstanislaus/.rvm/bin
/usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
Not everyone keeps the default system version of ruby. Many will rename this file and use the MacPorts ruby, or compile it by hand, in which case it may be in a different location.
I recommend changing this so that it will look for the ruby executable in a different location if it's not in the default.
Visit http://linguisticlogic.wordpress.com/2010/11/27/homebrew-mac-osx-and-ruby/
just doing
sudo ln -s /opt/local/bin/ruby /usr/bin/ruby
may work !!!

Resources