1
I'm trying to install objective-ocaml on my Mac to compile another application (Unison) I would like to install however I'm getting errors doing so.
imrans-mac:/ Imran$ brew doctor Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these:
objective-caml
imrans-mac:/ Imran$ brew link objective-caml Linking /usr/local/Cellar/objective-caml/4.01.0... Warning: Could not link objective-caml. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/objective-caml/4.01.0/lib/ocaml/weak.p.cmx Target /usr/local/lib/ocaml/weak.p.cmx already exists. You may need to delete it. To force the link and overwrite all other conflicting files, do: brew link --overwrite formula_name
To list all files that would be deleted: brew link --overwrite
--dry-run formula_name imrans-mac:/ Imran$ brew link --overwrite objective-ocaml Error: No such keg: /usr/local/Cellar/objective-ocaml
Sorry the formatting of my log is terrible, if you look at the bottom line I have tried the -overwrite argument. It says theres
no such keg
... – Imran – 2013-10-28T00:38:26.453@Imran Try
brew doctor
. It should fix permission errors. Alsobrew update
. Uninstall the current builds of unison/objective-caml and make sure the folders are cleared. – Simon Sheehan – 2013-10-28T00:40:39.387I have used both
brew doctor
andbrew update
, they dont do anything. When usingbrew rm objective-ocaml
it returns No such keg: /usr/local/Cellar/objective-ocaml – Imran – 2013-10-28T00:43:38.937@Imran if you have used sudo before it can mess up permissions. try
sudo chown -R $USER:admin /usr/local
– Simon Sheehan – 2013-10-28T00:44:58.690@Imran did that fix it? – Simon Sheehan – 2013-10-28T01:21:06.430
Yeah the permissions were the issue as I have used
sudo
before. After fixing permissions I was able to usebrew link
to fix ocaml and install unison. Thank you! – Imran – 2013-10-28T01:39:57.070