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.
Related
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!
No command 'rvm' found, but there are 21 similar ones rvm: command not found. Comes up when I'm in Vagrant on linux ubuntu 14.04.
Installed Vagrant and VirtualBox.
Found over at rvm command not found
Your problem is that RVM is not loaded when you open a new terminal.
To solve this, run this command line: (if using login-shell)
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
Or this (if using non-login shell):
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc
This will add the path to RVM to load at each Terminal instanciation (close & re-open a terminal after you did this).
You could also try, if you're sshd into your box, running sudo apt-get update and then installing it?
I had this problem as well. I found that I had to add the full path for rvm in the provisioning script. The path is added to the environmental $PATH variable but not known to Vagrant during the provisioning.
/usr/local/rvm/bin/rvm install ruby-2.4.0
After provisioning:
[vagrant#Ruby ~]$ echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin: \
/usr/local/rvm/bin:/home/vagrant/.local/bin:/home/vagrant/bin
[vagrant#Ruby ~]$ which rvm
/usr/local/rvm/bin/rvm
Another option might be to source /etc/profile before executing an rvm, but I have not tried that yet.
I installed rvm on debian 7 using the command:
\curl -L https://get.rvm.io | bash -s stable --rails
from this article:
https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-an-debian-7-0-wheezy-vps-using-rvm
I get this output:
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/debian/7/x86_64/ruby-2.1.0.tar.bz2
Checking requirements for debian.
Installing requirements for debian.
Updating system...
Installing required packages: gawk, g++, libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libffi-dev
It hangs here forever. I tried waiting about 30 min. I also tried hitting ctrl-c and running some rvm commands. rvm list known works fine, but rvm install gets me back to the same "installing requirements" and it hangs as well.
Any ideas? Googleing only seemed to bring up issues involving OSX (I'm using debian in a vbox in windows 8).
Would installing each required package indiviually via apt-get be the best move?
I faced the same issue. To resolve, just mount the installation CD that you used to install Debian and it will work.
I encountered the same issue with Debian 8. As it turns out, the installation was looking for the required packages on the Debian install CD-ROM, which wasn't inserted. To fix this, run the following command:
nano /etc/apt/sources.list
Then, comment out the line beginning with "cdrom" so that it looks like the following:
# cdrom:[Debian GNU/Linux...
You should be able to run sudo apt-get update then try installing rvm again. However, I restarted my laptop before doing so. Therefore, I can't give 100% confirmation that it works without restarting.
As i've written in comment, try installing requirements by hand, sometimes something wilk silently fail and cause such issues. As OP found, the gawk package was causing the issue.
Just remove the cdrom entry from the sources.list file. This can be done easily:
sudo sed -i '/cdrom/d' /etc/apt/sources.list
This should take care of the problem. The message is because somehow you still have the cdrom entry in your sources.list file, you can check the content of the file using:
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 am new to Rails and Linux and have installed RVM with sudo.
sudo bash -s stable < <(curl -s
https://raw.github/wayneeseguin/rvm/master/binscripts/rvm-installer)
Now I have to run most commands (like spork) with 'rvmsudo'. It is redundant, and the way I learned, when something is redundand it is often wrong. How to get rid of this nuance? Is the only way to reinstall RVM? If so, how to properly reinstall?
Use rvm implode to uninstall rvm. Check that there are no environment variables left over in /etc/profile, /etc/bash_profile or whatever shell you're using. Once you do that, then re-install using the single user guide found here.
You'll have to execute the implode command using sudo since you installed it as root.
1)remove in home directory:
rm -rf .rvm*
2)remove from your bash file:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
3) remove from /etc/rvmrc file
sudo rm -rf /etc/rvm*
4)Delete everything else
sudo groupdel rvm
I couldn't find a complete/concise step-by-step to 100% remove rvm when it was run as root. Here's what I came up with, and I've tested it three times successfully:
sudo su -
rvm implode
groupdel rvm
rm /etc/rvmrc
rm /etc/profile.d/rvm.sh
You'll also want to double check that you don't have ~/.rvm or ~/.rvmrc or any rvm whatnot in your .bashrc (possibly .bash_profile on OSx), as you've likely been trying to install rvm several ways by this point!
Next, you'll need to reboot, as the global environment variables set in /etc/profile.d/rvm.sh will keep getting populated in new shells until you do. After rebooting, open a terminal and try this command to test:
echo $rvm_path
If it's empty, that means you've succeeded! If not, it'll most likely be set to /usr/local/rvm.