How to completely uninstall brew and re-install brew in ubuntu 19.04 - react-native

I installed homebrew on ubuntu 19.04 and it's accidentally stop, so the install not complete. but the folder already created.
If I install it again
sudo apt install linuxbrew-wrapper
I get a message:
linuxbrew-wrapper is already the newest version
but if I write command :
brew upgrade
I get this message:
Command 'brew' not found, but can be installed with:
sudo apt install linuxbrew-wrapper".
Can anyone help me fix this?

Maybe this can help more people...
I just executed the following command line
$/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
This is the same url as in here Homebrew homepage but instead of install.sh, I used uninstall.sh.

After performing what https://stackoverflow.com/a/57208010/2787992 said, you might need to run
sudo rm -rf /home/linuxbrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
sudo rm -rf /home/linuxbrew
For details see: https://www.how2shout.com/linux/how-to-install-brew-ubuntu-20-04-lts-linux/

Try uninstalling the packages.
To remove just linuxbrew-wrapper package
sudo apt-get remove linuxbrew-wrapper
If you want to delete configuration and data files
sudo apt-get purge linuxbrew-wrapper

Source your bashrc first
source ~/.bashrc 

Related

Can't install ruby 2.6.6 via rvm, error running '__rvm_make -10' on macbook pro m1

While installing the ruby 2.6.6 I'm getting this error:
Error running '__rvm_make -10'
please read /home/.rvm/log/1642694273_ruby-2.6.6/make.log
There has been an error while running make. Halting the installation.
I've tried to reinstall rvm but this changes nothing.
Other ruby versions are installed just fine.
rvm install 2.6.6 --with-out-ext=fiddle worked for me
downgrade libssl-dev with:
sudo apt install libssl-dev=1.1.1l-1ubuntu1.4
check the solution in this issue: https://github.com/rvm/rvm/issues/5209#issuecomment-1134927685
Right click Terminal from the Application/Utilities folder, Get Info, tick the "Open using Rosetta" box.
Uninstall Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
rm -rf /opt/homebrew/*
sudo rm -rf /opt/homebrew
Reinstall Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Restart terminal
Check Homebrew is working fine: brew doctor
Reinstall openssl: brew install openssl
Install Ruby: rvm install 2.5.3 Or any version
In case this helps anyone, none of the posted solutions worked on my intel MacBook Pro. brew doctor however did warn my developer tools were out of date. Uninstalling and reinstalling those allowed me to return to using RVM as normal:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

how to correctly install wkhtmltopdf in linux mint?

IM trying to install "wkhtmltopdf"
sudo apt install ./wkhtmltox_0.12.6-1.bionic_amd64.deb
when I try to run I get this command
E: Unsupported file ./wkhtmltox_0.12.6-1.bionic_amd64.deb given on commandline
can anyone show me how to fix this?
Use
# sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb
# sudo apt install -f
The last command should install any missing dependencies when running the first command.

not able to install anything because of brew no such file or directory error

I am trying to install do brew install python3 on my mac but i keep getting the following errors:
this is the first error:
No such file or directory # dir_chdir - /usr/local/Cellar
then a bit later i get this error:
An exception occurred within a child process:
Errno::EPERM: Operation not permitted # dir_s_mkdir - /usr/local/Cellar
I have ran brew update then brew doctor the brew cleanup but keep getting the error.
I have also checked to see if xcode is up-to-date but according to the appstore all my apps are up-to-date.
How do i fix this problem?
PS i also get these errors when trying to install other packages from brew.
Try uninstalling Homebrew and then re-installing solved issue for me.
Uninstall Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Re-install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Performed in MacOS Mojave (10.14.4)
Happened to me when uninstalling Laravel Valet.
Fixed by running: brew doctor, then brew cleanup after.
After that - brew install php worked just fine.
I experienced a similar error with a different package - brew install llvm.
Uninstalling homebrew and reinstalling led to more catastrophic issues that lasted for hours before I had to reach for my backup drive and restore everything.
What eventually worked was just creating the missing directory and everything worked.
So in this case:
sudo mkdir /usr/local/Cellar/dir_chdir
should solve the issue without too much hustle.
It worked for me after running below commands
sudo mkdir /usr/local/Cellar/dir_chdir
sudo chown -R $(whoami) /usr/local/Cellar
chmod u+w /usr/local/Cellar
I had this problem as well - it was partly coming from brew being installed under a different user on my mac I had set up for a past project. I had to follow the uninstall instructions (found in the homebrew github) with a little bit of sudo help and it cleared up the issue. Was able to install and properly run packages after.
For ubuntu just go to the location which u are getting error. Then open the contained file using a suitable application. In my case, it is getting as follows in the image view.
In this case, the error is showing in 36's lines.
yes. There is no location such as. I have to find out the location which contains brew. It was in /home/linuxbrew/.linuxbrew//bin/brew shellenv
So update your .profile file as in the brew file contains location as follows image shown.
uninstall brew :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
and again reinstall brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
executed this same as it is on your terminal, it will really work.

sudo: pecl7.2-sp: command not found

I need to install GeoIP on PHP 7.2 .
For this I am using following commands -
sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install libgeoip-dev
sudo pecl7.2-sp install geoip-beta
Top two commands are run successfully, But while running the third on I am getting following error -
sudo: pecl7.2-sp: command not found
Any suggestion, How can I install pecl on php 7.2 or any other way to install GeoIP on php 7.2.
I am on ubuntu 16:04 and the following got it working for me (more or less):
Run the following command:
sudo apt-get install php-pear php-dev
Now you can run the command pecl instead pecl7.2-sp - seems to work fine though:
sudo pecl install geoip-beta
Hope that helps.
I had to install imagick for php7.3 so I was getting same error using command like this
sudo pecl7.2-sp install imagick
What worked for me is running the command like this
pecl -d php_suffix=7.3 install -f imagick

npm install error Cannot find module 'read-package-json.js'

when I install npm as above picture,the error messge show:
Error: Cannot find module '/private/var/folders/dm/bzjdbz_s1z1bby3p087g0jr00000gn/T/npm.922/package/bin/read-package-json.js'
details see the pic.any tips?thanks
Here's how I solved it:
echo prefix=~/.npm-packages >> ~/.npmrc
wget https://registry.npmjs.org/npm/-/npm-5.5.1.tgz
tar xf npm-5.5.1.tgz
cd package
./npm-cli.js install npm -g
You can follow the following steps:
brew uninstall --force node
brew update
brew upgrade
brew cleanup
brew install node
sudo chown -R $(whoami) /usr/local #may not work
brew link --overwrite node
sudo brew postinstall node #may not work
You may face problems with sudo, but no worries it should work without it :)