Cant install Homebrew after cancel - homebrew

I tried to install Homebrew, but my internet connection was down for a while.
When i tried to install homebrew again
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It gives me the error:
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
How can I solve this? Thanks!

It worked after running CCleaner and wait a while.

Related

How to uninstall Homebrew of Rosetta and install Homebrew native on Mac Bigsu (M1)

Previously I have installed Homebrew rosetta version on MacOs M1,
now I see HomeBrew has native version, So how do I remove HomeBrew on rosetta and install the native version.
Please help me with this problem, Thanks
Uninstall Rosetta version of Homebrew
Run in rosetta mode inside terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Then install natively inside the terminal (without rosetta):
(with help of https://www.youtube.com/watch?v=nv2ylxro7rM)
cd /opt
sudo mkdir homebrew
sudo chown -R $(whoami) /opt/homebrew
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
(Add the Homebrew bin directory to the PATH if you are using zsh)
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc

Can't get Node.JS to install on Mac issues with $PATH

I'm trying to push to Heroku, but the app is rejected Webpacker requires Node.js >= 6.0.0 and you are using 0.10.30. I've just done a fresh install of node.js which should be on my path /usr/local/bin.
My path is below, which looks a bit crazy to me, but I can see /usr/local/bin is in there. Where am I going wrong?
Simons-MBP:~ Simon$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/Simon/.rvm/gems/ruby-2.4.0/bin:/Users/Simon/.rvm/gems/ruby-2.4.0#global/bin:/Users/Simon/.rvm/rubies/ruby-2.4.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/Simon/.rvm/bin
Have now installed node via Homebrew:
Simons-MBP:gourmet_coffee Simon$ brew link node
Linking /usr/local/Cellar/node/9.4.0... 7 symlinks created
Simons-MBP:gourmet_coffee Simon$ node --version
v9.4.0
Simons-MBP:~ Simon$ node --version
v9.4.0
Simons-MBP:~ Simon$ sudo chown -R $USER /usr/local
Password:
Simons-MBP:~ Simon$ brew link --overwrite node
Warning: Already linked: /usr/local/Cellar/node/9.4.0
To relink: brew unlink node && brew link node
Simons-MBP:~ Simon$ brew unlink node && brew link node
Unlinking /usr/local/Cellar/node/9.4.0... 7 symlinks removed
Linking /usr/local/Cellar/node/9.4.0... 7 symlinks created
However I'm still getting the same rejection when pushing to Heroku
Should I be adding /usr/local/Cellar to my $PATH?
Try to install from brew:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew update
$ brew doctor
After that add brew location to your $PATH in your .bash_profile:
$ export PATH="/usr/local/bin:$PATH"
Search and reinstall specific version (if brew cannot search node, just run brew install node):
$ brew search node
$ brew unlink node
$ brew install node#6
$ brew link node#6
To see your current node version:
$ node --version

Installing brew on Mac 10.6 results in syntax error

Running the following command from http://brew.sh/:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
...result in:
-e:192: syntax error, unexpected '.', expecting $end
.map { |d| File.join(HOMEBREW_PREFIX, d) }
^
I'm using zsh on Mac OS 10.6.
ok so to install manually through terminal do
$ cd /usr/local
$ mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
then you need to change your bash_profile like this:
$ echo 'export PATH="/usr/local/homebrew/bin:$PATH"' >> ~/.bash_profile
you might need to change permissions to the homebrew folder as well:
$ sudo chown -R $(whoami) /usr/local/homebrew
this worked for me
The official homebrew install command use some bashism. The easiest way to solve this is to run the homebrew install command with bash -c in front of it :
bash -c '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'
Fast forward to 2020 and homebrew is no longer ruby based, but bash-based. Also, it officially only supports 10.13 or higher, while keeping an eye out for 10.9 users.
The new way to get homebrew on 10.6 or lower is by using TigerBrew:
https://github.com/mistydemeo/tigerbrew
This is a maintained fork of homebrew, with the purpose of offering support for 10.4-10.7.
After installing tigerbrew, install a newer curl: brew install curl.
That should fix any ssl issues.

tried installing brew it shows installed but when i type brew its showing -bash: brew: command not found

when i tried installing brew through this command
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
it showed me
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
but when I type
brew in terminal it shows
-bash: brew: command not found
Maybe brew is just not available in your path. Have you tried "uninstalling" it as told:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
And then reinstall it? Also probably closing the terminal and then reopening it could be an easy solution to make your terminal recognize a changed path

Unable to install erlang on cent os

While installing erlang on cent os I got the following error
Error: Package: erlang-crypto-R16B03-0.2.el6.x86_64 (erlang-solutions)
Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
Error: Package: erlang-crypto-R16B03-0.2.el6.x86_64 (erlang-solutions)
Requires: libcrypto.so.10(OPENSSL_1.0.1)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I searched around on google and found that the probelm can be solved by installing openssl-devl. So I did that and tried installing erlang again but got the same error.
How can I install the latest version of erlang on cent os 6.4?
How you are installing it? According to Riak's documentation, you use:
sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
And then, you build Erlang:
wget http://erlang.org/download/otp_src_R15B01.tar.gz
tar zxvf otp_src_R15B01.tar.gz
cd otp_src_R15B01
./configure && make && sudo make install
Installing Erlang on GNU/Linux
You can install erlang using erlang-solution repo
Install repo
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
Install erlang
sudo yum install erlang
This worked for me on centos7...
sudo yum install epel-release
sudo yum update
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
sudo rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum install erlang
Using EPEL from Fedora is a surefire way on Centos 6. I currently have erlang-crypto-R14B-04.3.el6.x86_64 installed. If you have different repos enabled it could be a conflict or that there is an issue with the package from the other repo (I would recommend disabling whatever repo that provides it or at least ignoring erlang from that repo).
Here is a simple way to install EPEL on Centos
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
yum -y install erlang-*
your error is
"Error: Package: erlang-crypto-R16B03-0.2.el6.x86_64"
so you can download&install R16B03
wget http://erlang.org/download/otp_src_R16B03.tar.gz
tar -zxvf src_R16B03.tar.gz
cd src_R16B03.tar.gz
yum localinstall erlang
To install erlang in centos offline.Follow below steps,
We need to have one internet connected machine to download rpm's.
yum install yum-plugin-downloadonly -y
yum install --downloadonly --downloaddir=/home/user/ erlang
All of erlang dependencies packages downloaded as rpm on /home/user/ directory
Now copy all rpm's to offline machine in any directory ( eg., /home/user/ )
Type following command to install erlang with its dependencies too.,
cd /home/user/
rpm -Uvh *.rpm
It's Done!
check using command,
erl
(press Ctrl+c twice to get exit from erl command )

Resources