When I try to install a new cask a message appears:
"The default Caskroom location has moved to /usr/local/Caskroom"
How to move the old directory without breaking the links to the new location?
Recipe
# FIRST SOLUTION
# reinstall all casks (can be slow)
brew cask install --force $(brew cask list)
# --------------------------------------
# SECOND SOLUTION
# move cask directory to its new location
mv /opt/homebrew-cask/Caskroom /usr/local
# relink existing casks to the new location
for f in ~/Applications/*.app; do oldloc="$(readlink "$f")"; [[ -e $oldloc ]] || ln -sf "/usr/local${oldloc#/opt/homebrew-cask}" "$f"; done
See here for more information: https://github.com/caskroom/homebrew-cask/issues/21913
I had same issue and i did following which fixed it.
1.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
2.
MBP:~$ brew install terraform
==> Downloading https://homebrew.bintray.com/bottles/terraform-0.7.5.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring terraform-0.7.5.el_capitan.bottle.tar.gz
==> Caveats
zsh completion has been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/terraform/0.7.5: 4 files, 123.3M
Related
I have installed zsh with homebrew, and am now trying to install oh-my-zsh.
% brew install zsh
...
Warning: zsh-5.3.1 already installed
That installs zsh, and sets my $SHELL variable to /usr/local/bin/zsh
% which zsh
/usr/local/bin/zsh
% echo $SHELL
/usr/local/bin/zsh
But when I try and install oh-my-zsh from the github source, I'm told that zsh has not been installed.
% curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
Zsh is not installed! Please install zsh first!
Looking at the install script, it appears that zsh has not been added to my etc/scripts file.
% grep zsh /etc/shells | wc
0 0 0
Why is homebrew not "correctly" installing zsh? How can I update my /etc/shells file to include the necessary information?
After looking at the contents of my /etc/shells file, it appeared that something had damaged that file. Very strange.
Rewriting the /etc/shells to the following fixed the issue for me.
/usr/local/bin/zsh
/bin/bash
Then I can change shells as I would expect and installing oh-my-zsh works.
Hello I downloaded Python from Homebrew but my computer seems to be using the pre installed Apple version.
Is there a way to change this so that my computer can use the Homebrew Python instead?
I read something about bash files on here but I can only see the apple stuff in there. There is nothing in there from usr/local/Cellar.
Because i do not know what you already did and if you installed Homebrew correctly or not i would write out the steps of how you should have done it. I will tell you how to install Homebrew and how to point your package to your path so it locates your python before the Apple python. Also i am assuming you have El Capitan.
1) Download Xcode form App Store if you don't have it.
Steps 2-9 are using Terminal (Applications -> Utilities -> Terminal)
2) Install the command line tools
xcode-select --install
3) Install Homebrew (This will install Homebrew to the root):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
4) Update brew and check with the doctor to fix any issues:
brew update
brew doctor
5) Check if you already have a .bash_profile and if not create it.
a) Check for the .bash_profile
cd $HOME
ls -al
If you see .bash_profile on the list skip (b)
b) Create the bash profile
cd $HOME
touch .bash_profile
7) Export the Path to the bash file:
cd $HOME
echo export PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile
source ~/.bash_profile
8) Install your package, for example:
brew install python
9) Run the doctor and fix any issues:
brew doctor
10) Check the Path and make sure that the /usr/local/bin: is before /usr/local/
$PATH
If during the process you get an error saying that you do not have permission add sudo in front of the command and try again.
Hope it helps!
Very simple script that installs homebrew in mac os 10.10.5:
iMac-phuocho:~ phuocho$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
==> The following directories will have their owner set to phuocho:
/usr/local/.
/usr/local/bin
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin
Press RETURN to continue or any other key to abort
it appears like this 4 hours .please help me.
The script is waiting for you to confirm that you are happy for it to perform the listed tasks.
Press RETURN to continue or any other key to abort
means that it is waiting for you to press enter before it continues
OSX - 10.8.5
Running Homebrew
rvm
Whenever I open a new shell I get the following and I think, "ugh", thats not good.
Last login: Thu Nov 7 07:12:43 on ttys000
-bash: /etc/profile.d/rvm.sh: No such file or directory
I then run echo $PATH and get
Matthews-MacBook-Pro-2:~ Matthew$ echo $PATH
/Users/Matthew/.rvm/gems/ruby-1.9.3-p448/bin:/Users/Matthew/.rvm/gems/ruby-1.9.3-p448#global/bin:/Users/Matthew/.rvm/rubies/ruby-1.9.3-p448/bin:/Users/Matthew/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/ImageMagick/bin:/usr/local/bin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/rvm/gems/ruby-1.9.3-p448/bin:/usr/local/rvm/gems/ruby-1.9.3-p448#global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p448/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Matthews-MacBook-Pro-2:~ Matthew$
I think my .bash_profile is a mess and I really would appreciate some ninja guidance...
Thank you
When you open the Terminal, you begin a bash shell session. You can set some commands to run every time you start a bash session. The place to put these initial bash commands is usually in ~/.bashrc or ~/.bash_profile. See if you have any reference to the file /etc/profile.d/rvm.shthere and check if that file actually exists on your machine.
UPDATE:
I have heard of problems if o installed rvm as sudo. Try removing it and reinstalling again without sudo:
sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh \
/usr/local/rvm /usr/local/bin/rvm
sudo /usr/sbin/groupdel rvm # this might fail, it's not that important
Reopen terminal and make sure rvm ins removed:
env | grep rvm
It should return empty if not try to restart de computer. After it return empty you can install it:
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
I previously used a package installer from railsinstaller.org to set up an installation of Rails on my Mac OS X system. There's always been the odd problem, but nothing major. I decided to delete it completely and start again, but now I'm seeing more problems.
Is it worth completely deleting my installations of Git, Homebrew, Ruby and anything else that you might recommend, and just starting again perhaps?
Here's the problem I'm getting when typing into terminal:
$ rvm reinstall 1.9.3
device-3ebf56 local (master)*: brew doctor
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/opt/sm/pkg/active/bin/curl-config
/opt/sm/pkg/active/bin/ncurses5-config
/opt/sm/pkg/active/bin/ncursesw5-config
/opt/sm/pkg/active/bin/pkg-config
/opt/sm/pkg/active/bin/xml2-config
/opt/sm/pkg/active/bin/xslt-config
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libosxfuse_i32.2.dylib
/usr/local/lib/libosxfuse_i64.2.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libosxfuse_i32.la
/usr/local/lib/libosxfuse_i64.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/osxfuse.pc
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
clusterdb
createdb
createlang
createuser
dropdb
droplang
dropuser
ecpg
git
git-cvsserver
git-receive-pack
git-shell
git-upload-archive
git-upload-pack
gitk
pg_basebackup
pg_config
pg_dump
pg_dumpall
pg_restore
pg_upgrade
psql
reindexdb
vacuumdb
Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile
device-3ebf56 local (master)*: echo export PATH="/usr/local/bin:$PATH" >> ~/.basdevice-3ebf56 local (master)*: echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile
EDIT:
Thank you both for your replies.
I have no idea what I'm doing.
I tried running the remove homebrew code and then I got the following error. I thought it had uninstalled so I tried reinstalling it but then was told it's still there, so I tried reinstalling it. I hope this makes sense:
Last login: Fri Sep 27 18:03:54 on ttys000
-bash: __rvm_add_to_path: command not found
env: node: No such file or directory
device-3ebf56 ~: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"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
device-3ebf56 ~:
device-3ebf56 ~:
device-3ebf56 ~: rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
-bash: brew: command not found
device-3ebf56 ~: