brew link php55 does not work - macos

I tried to install php55 which works fine itself, but the linking does not work. Which means I cannot install any modules via brew.
$ brew link php55
Linking /usr/local/Cellar/php55/5.5.17... Error: No such file or directory - /usr/local/Cellar/php55/5.5.16/include/php
Brew tries to link 5.5.16 but it should use 5.5.17. I already reinstall php55 again a few times and used "brew cleanup" in between.
How can I link it correctly?

Remove it with "brew remove php55". It will automatically look at the other version afterwards. Don't forget to relink it with "brew unlink php55 && brew link php55".

Related

How do I remove a broken terminal command in OSX?

I installed protobuf 2.5 using homebrew but wanted to upgrade to the latest version. I ran brew uninstall protobuf#2.5 and then brew install protobuf.
However now when I run the protoc command I get the error:
-bash: /usr/local/opt/protobuf#2.5/bin/protoc: No such file or directory
I tried running brew unlink protoc && brew link protoc but the error still persists. How do I go about removing the association of protoc with the deleted directory?
Looks like you’ve installed a newer version of protobuf, but your symlinks are still pointing to the old version. Clean up again:
brew uninstall protobuf#2.5
brew unistall protobuf
brew unlink protobuf
At this point, which protobuf should return empty. If it returns a file or link, remove that manually, then brew install again.
Hope this helps.

How do I undo `brew link --force openssl` on mac yosemite

I had some issues while trying to upgrade the brew formulas with php54. I found on github some suggestions to deal with the openssl php brew bug. Some of them suggested to run brew link openssl --force and I did that but at the end the issue was somewhere else and was not related to openssl.
So how do I undo brew link openssl --force. I tried to see what this does with brew link openssl --dry-run but the output is:
Warning: openssl is keg-only and must be linked with --force
Note that doing so can interfere with building software.
and obviously not the one that I expect.
Thanks.
Just do
brew unlink openssl
That will remove the symlinks that were created when running brew link.

Qmake installed but not linked - Using Brew - Mac

I have installed Qmake using brew.
brew install qt
The results which the terminal brings is:
Warning: qt-4.8.6 already installed, it's just not linked
This is a problem with brew to install correct the things? because I am having the same "not linked" problem with PostgreSQL.
Thks
I found the problem:
The Brew can't write to the folder /usr/local/lib/
So I used the command: sudo chown -R $USER /usr/local/lib
I found a similar error here: Brew doctor says: "Warning: /usr/local/include isn't writable."
But this problem was with another folder permission.
The Brew can't write to the folder
/usr/local/lib/
So I used the command:
sudo chown -R $USER /usr/local/lib
After need uninstall and install qt again. (If you run reinstall the problem will continuous)
brew uninstall qt
brew install qt
I found a similar error here:
Brew doctor says: “Warning: /usr/local/include isn't writable.”
But this problem was with another folder permission.
Try
brew link qt
Which should tell brew to link the package.
If that doesn't work, someone else had a similar problem here: Error: The 'brew link' step did not complete successfully

Cannot install ruby-1.9.2 in Mac OSX 10.8.1 due to symlink error

First, I tried the common rvm install.
rvm install 1.9.2
However, the following error was shown:
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
Then I run
rvm requirements
and find these following part of output useful
Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.
Xcode 4.1 and earlier:
- Ruby will build fine.
Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
* Install apple-gcc42 from Homebrew
* Install osx-gcc-installer
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
This can live side by side with an existing Xcode 4.2+ install or Command Line Tools for Xcode.
so I tried:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
However, I got the following error
Warning: Could not link apple-gcc42. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link apple-gcc42'
==> Summary
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 23 seconds
kanitw:shell.venturelab.com kanitw$ brew link apple-gcc42
Linking /usr/local/Cellar/apple-gcc42/4.2.1-5666.3... Warning: Could not link apple-gcc42. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/include/gcc
/usr/local/include is not writable. You should change its permissions.
What would be my best solution? I kinda remember from somewhere that I should not use sudo with brew since I will mess up the whole installation.
You can change /usr/local directory owner
sudo chown -R `whoami` /usr/local
But, if you have mysql installed, you mast fix its owner
sudo chown -R mysql:mysql /usr/local/mysql
You should run brew doctor and then change the permissions accordingly. There might be other issues.
Change the permissions of your /usr/local directory and try again.

Lion (10.7) Not supporting Convert(1). Dylib error

When trying to use convert(1), I get the following error:
dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
Referenced from: /usr/local/bin/convert
Reason: image not found
Trace/BPT trap: 5
Any idea how I could fix it ?
I was getting this error as well–with a homebrew install of ImageMagick. Along the same lines as Pascal, I fixed it with
Install XCode 4.1 (from the App Store)
In Xcode, go to Xcode > Preferences... > Downloads tab > click Install next to Command Line Tools
Uninstall ImageMagick with brew uninstall imagemagick
Update homebrew with brew update
Install latest homebrew with brew install imagemagick
Run brew doctor and delete any of the *.la and *.a files listed if step 4 fails on make install
I got the same error and what solved the problem for me was:
Install the latest XCode version from the Mac Appstore
Install ImageMagick using Macports (sudo port install imagemagick)
Both steps took a while, but in the end ImageMagick worked fine again.
I installed xcode but had some issue with macports. Bummer!
I copied the libclparser.dylib file over from an old backup of 10.6, changed the permissions to match the other files in that folder and it worked!
Also see here:
https://stackoverflow.com/questions/6674666/installing-imagemagick-leads-to-weird-error-involving-opencl
Edit:
I found this, which may be useful: http://cactuslab.com/imagemagick/
Also, the file is here: http://www.workdreamer.com/uploads/libclparser.dylib
Reinstalling it even with brew instead of macports didn't work for me. Copying it did.
Try the following command:
brew doctor
to diagnose the common problems.
One of it could be removing DYLD_FALLBACK_LIBRARY_PATH variable from your ~/.profile
Or you have to re-install libtool by:
brew reinstall libtool --universal && brew unlink libtool && brew link libtool

Resources