Just install libxml2 on my system using brew
brew update
brew install libxml2
Checking the path of the installation
brew --prefix libxml2
gives me an output of /usr/local/Cellar/libxml2/2.9.9_2, however when i try to cd into that path
cd /usr/local/Cellar/libxml2/2.9.9_2 it tells me the path is non existent
any advise? :(
Related
When I install watchman using brew install watchman, it got this Error: You must brew link pcre before watchman can be installed. So I try brew link pcre and brew link --overwrite pcre, I just got
linking /usr/local/Cellar/pcre/8.36...
Error: Could not symlink share/man/man3/pcre.3
/usr/local/share/man/man3 is not writable.
Can anyone help?
By design Homebrew (brew) requires the contents of /usr/local to be owned by you. You can fix it easily by running:
sudo chown -R `whoami` /usr/local
from your Terminal.
See here for further explanation.
first
sudo chown -R 'your name' /usr/local
then
brew link pcre -f
then
brew install watchman
it should work
Ive installed imagemagick on Yosemite, but during the installation I got this error...
Linking /usr/local/Cellar/libtool/2.4.2...
Error: Could not symlink share/info/libtool.info
/usr/local/share/info is not writable.
I have tried brew link libtool but get the same error
I have tried running brew doctor and brew prune
What else can I do to try and get this installed correctly?
Try this:
$ sudo chown -R $USER /usr/local/share/info && brew doctor
I am trying to build a todo list with Ruby and Ruby on Rails. In my rails application I add the gems I need and then type 'bundle' in my terminal. Everything works until:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/Misha/.rbenv/versions/2.1.2/bin/ruby extconf.rb
Building nokogiri using packaged libraries.
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
I go to the link provided and for mac it instructs to do the following commands:
sudo port install libxml2 libxslt
sudo gem install nokogiri
but then i get the command not found. I tried following a similar problem and solution:
sudo vi /etc/paths
Add 2 following lines:
/opt/local/bin
/opt/local/sbin
but still have the same problem.
I suspect sudo port install libxml2 libxslt is failing because you don't have the MacPorts package manager installed. However, I would install Homebrew instead (which is my personal package manager preference):
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Then continue with the instructions provided in the error message, substituting brew for sudo port:
brew install libxml2 libxslt
if that works, try:
sudo gem install nokogiri
Additionally to the answer of #thohl that I totally agree. Nokogiri sometimes is difficult to install. For that reason I keep the following recipe:
cd $( brew --prefix )
git checkout 763d946 Library/Formula/libxml2.rb
brew unlink libxml2
brew install libxml2 libxslt
git checkout master Library/Formula/libxml2.rb
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install nokogiri --verbose -- --with-xslt-dir=$( brew --prefix )/Cellar/libxslt/1.1.28 --with-iconv dir=$( brew --prefix )/Cellar/libiconv/1.14 --with-xml2-include=$( brew --prefix )/Cellar/libxml2/2.8.0/include/libxml2 --with-xml2-lib=$( brew --prefix )/homebrew/Cellar/libxml2/2.8.0/lib --use-system-libraries
These incantations made the trick in my case
I'm trying to install wxWidgets on Mac OS X 10.9. It's already installed, but I'm having the problem described here. Someone suggested to add ENV.append_to_cflags "-stdlib=libc++". I did, but I'm not able to recompile the code.
$ brew install wxmac
Warning: wxmac-3.0.0 already installed
$ brew edit wxmac
=> ok, modifications done, now I want to recompile and reinstall
$ brew uninstall wxmac
Uninstalling /usr/local/Cellar/wxmac/3.0.0...
$ brew install wxmac
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/wxmac- 3.0.0.mavericks.bottle.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/wxmac-3.0.0.mavericks.bottle.2.tar.gz
==> Pouring wxmac-3.0.0.mavericks.bottle.2.tar.gz
🍺 /usr/local/Cellar/wxmac/3.0.0: 775 files, 41M
How can I force homebrew to recompile?
Homebrew is installing wxmac in bottle form (a pre-compiled binary of wxmac). To build from source, add the --build-from-source flag when calling brew install:
$ brew install --build-from-source wxmac
To rebuild all installed FORMULAE from source:
$ brew list | xargs brew reinstall --build-from-source
libyaml warning doesn't go away, even if you install libyaml
gem install bundler
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Fetching: bundler-1.3.4.gem (100%)
Successfully installed bundler-1.3.4
First remove any previous docs of yaml by
cd .rvm/src
sudo rm -rf yaml*
Then you can do rest of the install by -
rvm pkg install libyaml
P.S You will need to reinstall ruby after this.
UPDATE: If rvm pkg seems to be deprecated. You can compile a source on your own. All you
gotta do is download the latest version of libyaml from http://pyyaml.org/download/libyaml/
tar zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure
make
make install
UPDATE2: BTW, you could still use rvm pkg and/or when reinstalling ruby make sure to enbale autolibs by
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
A friend of mine had a similar problem on his mac.
brew install libyaml
ended up working for us and we were able to avoid a reinstall of ruby.
If using homebrew, a temporary fix that worked for me was to run:
brew unlink libyaml && brew link libyaml
plus you may also need to run:
brew unlink openssl && brew link --force openssl
See this issue thread for more details: https://github.com/wayneeseguin/rvm/issues/2689