Warning: vim-7.4.712_1 already installed, it's just not linked - macos

Disclaimer: Complete Noob
I just started using OS X for the first time. Decided to start using vim. I installed vim with YouCompleteMe. However, when I realized I did not have the appropriate version to use the plug in, I believe I reinstalled on top of the existing installation which I read afterwards was bad. I then tried installing through brew by using the command
brew install vim --override-system-vi
Now I get the error
Warning: vim-7.4.712_1 already installed, it's just not linked
All I want to do is install vim 7.4 so I can install YouCompleteMe.
When I run the vim command I get all this junk
Error detected while processing /Users/raulalan/.vimrc:
line 50:
E117: Unknown function: vundel#rc
line 59:
E492: Not an editor command: ^D # This means Ctrl+D
YouCompleteMe unavailable: requires Vim 7.3.584+
Is this due to installing on top of the existing directory without using the -override-system-vi flag. Help is super appreciated since I feel completely lost using these new environments.

Brew is telling you that you installed vim, but for some reason it can't be linked. This is usually because there are other files around that brew doesn't know about, and doesn't want to delete.
To link vim, run brew link vim. Brew may refuse to link, and instead tell you that linking would delete some files. In that case, use brew link vim --overwrite.

Related

How to install a specific version of vim (+clipboard)

I'm trying to enable copying to OSX's clipboard in vim and most resources I have found say that I need a version of vim with +clipboard. These resources also indicate that this should be as easy as running brew install vim, however, I am stuck with -clipboard even after updating. Any suggestions as to how to force this feature? Do I even need it to achieve the desired behavior?
a brew update brew install vim should give you vim with +clipboard.
However your path probably still points to the old vim. Try that:
alias vim="/usr/local/bin/vim"
probably this will also work: (Not anymore, see the Update)
brew install vim --with-override-system-vim
Addition: I recommend to install it with brew install vim --with-client-server so you will have +xterm_clipboard.
Alternativly you could install macvim which should have all these features already in:
brew install macvim --with-override-system-vim
Update
--with-override-system-vim was removed. The best solution in my opinion is to just add macvim in front of your PATH:
PATH="/Users/user/Applications/MacVim.app/Contents/MacOS/Vim:${PATH}"
export PATH
You can test if vim points to the right instance with which vim

Tex error occurred while upgrading octave with brew

I first installed octave through brew with the instruction on the office website. One day when I entered brew update && brew upgrade, octave started to upgrade but one error occurred said
You don't have a working TeX binary (tex) installed anywhere in your
PATH, and texi2dvi cannot proceed without one. If you want to use this
script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do). See the --help
output for more details.
So I entered brew cask install mactex to install tex and added the Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin to the PATH, when I run tex, it correctly processed:
terminal screenshot
Then I run brew upgrade but the same error occurred again.
I realized that the --without-docs argument may fix this problem but if I want to install docs (since I have already installed tex) what should I do?
I had similar problem while installing another program (not octave) and after looking around I found that I needed to install TeTex (http://www.tug.org/teTeX/) or TexLive, however I decided to install TexLive because TeTex is not mantained anymore...
For me it worked after installing Texlive on the basic configuration. You can follow the instructions over here:
http://www.tug.org/texlive/quickinstall.html

Brew update failed on Yosemite

I upgraded my Mac to the new OSX 10.10.
brew update failed with:
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
I tried to follow "Getting a "bad interpreter" error when using brew", but I couldn't get it working.
I do not have Ruby in /usr/local/bin or /user/bin, which may be for same reason which ruby returns nothing.
I have Xcode 5.1 with the command line tools installed. Whenever I start terminal I get:
-bash: /etc/profile.d/sm.sh: No such file or directory
-bash: /etc/profile.d/rvm.sh: No such file or directory
Can anyone suggest possible solutions?
First off upgrade Xcode to 6.1 This is the version that works with Yosemite.
After that make sure you RUN Xcode and Agree to the license ( i know it sucks ).
Note: After Updating My "Oh My Zsh" tools and restarting Xcode it installed some command line tools that I'm pretty sure are important.
There are things to note:
Mac OSX does come with a Ruby preinstalled in /bin/ruby. That is Apple's own installation, used for some of their tools, and basically should be ignored. Updating it could break those tools, and worse, deleting it, will break them. Trying to reinstall it is a pain, so it's better to pretend it isn't there.
We generally recommend using either RVM or rbenv to manage/install any other Ruby version. Those tools are well tested and make it easy to switch back and forth between versions.
rbenv is easier to manage but lacks some of the features of RVM.
Closely follow the RVM installation instructions if you go that way; We see a lot of questions on Stack Overflow caused by people who ignore the directions, or who follow directions on a different site besides RVM's home site. (The RVM authors really do know better than anyone else how to make it work.)
Brew can install Ruby, but switching between versions gets stickier.
It sounds like your PATH variable doesn't include /usr/bin, which is odd, because it should. If it did, it should find the default Ruby.
echo $PATH
will display your search path. It's editable and, if
ls /usr/bin/ruby
shows that Ruby does exist in /usr/bin then you should add it back into the path. You can do that by editing ~/.bashrc, but also check ~/.bash_profile to make sure something isn't messing up the path. And, if you don't understand how the path works, take the time to read about it, because a badly set-up PATH variable can slow your use of the command-line, or cause all sorts of weirdness.
By default there is no /usr/local/bin/ruby. It won't exist using RVM or rbenv either, but Homebrew will probably put a symlink; I don't have it supplying my Ruby, so I can't check that.

Homebrew version of vim won't open files

I installed vim via brew so I could have the latest version (7.4) and get syntax highlighting for Clojure. No big deal. Unfortunately, the brew version of vim seems to be broken on my system. I also aliased the vim command:
brew install vim # Install went successfully
alias vim=/usr/local/Cellar/7.4.052/bin/vim # Shouldn't be any problems here
When I open the brew version of vim, it fails to load any of my plugins (I use spf13) throwing a bunch of "Undefined variable" and "Invalid expression", etc errors for every plugin in my bundle directory; I just hit enter to continue. My .vimrc loads properly. When I open a file, it opens two tabs, both blank. One is a new file, the other is the file I tried to open, except there's nothing in it.
Potentially useful information: echo $VIM returns an empty line, while echo $ZSH returns /User/bsima/.dotfiles as expected.
Here are my dotfiles, but I don't think the problem lies in those configuration files.
Is this a known bug? Or is something wrong with my vim install?
I have no idea what's going on and I really miss my vim :( As good as Textmate is, I can't be without vim forever.
Edit: MacVim, installed via Homebrew, kinda works. It still opens 2 tabs on startup, but it does open files for editing and saves.
I found the problem: it was with my spf13 vim config. The following commands fixed the issue, in addition to double-checking that symlinks such as ~/.vim and ~/.vimrc were correct:
> which vim # This should output /usr/local/bin/vim since I'm using Homebrew
/usr/local/bin/vim
> cd ~/.spf13-vim-3
> ./bootstrap.sh # Basically re-installs spf13

bash __git_ps1 command not found

I am a beginner trying to setup a developer environment on my new Mac following the steps from this link: http://vanderveer.be/setting-up-my-perfect-developer-environment-on-osx-10-8-mountain-lion-10-8-2-final-edition/.
After executing the files from git, my terminal window now shows:
rbenv: version `1.9.3-p194' not installed
-bash: __git_ps1: command not found
The first line only shows when I open a new terminal window, while the second shows everytime I press return no matter what I type into the terminal.
I have read through many questions on stackoverflow and tried to mimic their solutions to no avail. I think I've made a mistake in installing the package from git as I am not so experienced and I think now I may have messed up the configurations, and was also wondering if there is any way to go back to default settings for bash?
Many thanks!
Allen
If you've not installed a newer version of Git on your Mac, start by doing that. You can grab the download from here: http://git-scm.com/download
Once it's installed, you should source git-completion.sh and git-prompt.sh from your ~/.profile (or ~/.bashrc, if you have it):
source /usr/local/git/contrib/completion/git-completion.bash
source /usr/local/git/contrib/completion/git-prompt.sh
That should fix the __git_ps1 error.
I'm not a Rubyist, but the rbenv error is coming from the fact that the setup in the dotfiles you are following is trying to set the default Ruby version to "1.9.3-p194". The rbenv tool is there to make a number of different Ruby versions available, but you have to install them first. In your case, I think you need to run this:
rbenv install 1.9.3-p194
After that, the version will be available, and you shouldn't see the warning anymore.

Resources