Getting error when running the command brew install fceux
E: Linuxbrew directory detected, but it seems to be broken.
Try to remove '/home/dileep/.linuxbrew' and try again.
This error may occur when you have a Linuxbrew directory but no brew executable in it.
That is, /home/dileep/.linuxbrew exists but not /home/dileep/.linuxbrew/bin/brew.
This shouldn’t happen, hence the error message.
The simplest way to fix this is to remove your Linuxbrew directory and reinstall it.
Related
I have incorrectly installed Homebrew to a different folder and now can't interact with it nor uninstall it. It is located in: users/pavel/learningpython/homebrew
Is there a safe way to uninstall it all or reconfigure it so I can run it?
Thank you
I tried to change directory to various folders, be it those under the homebrew folder or outside of it, but can't seem to run homebrew anywhere. At first, when I was not able to even locate it, I tried various solutions with the .zshr file and it was not helpful. So I see Homebrew in Mac Finder, but can't find a way to interact with it, it always says "brew not found".
This is what the brew executable file writes when I run it through Finder:
/Users/pavel/learningpython/homebrew/bin/brew ; exit;
/Users/pavel/.zprofile:6: no such file or directory: /opt/homebrew/bin/brew
/Users/pavel/.zprofile:7: no such file or directory: /opt/homebrew/bin/brew
I'm trying to cleanup my installed packages using brew cleanup but keep getting the message Permission denied # apply2files - /usr/local/lib/docker/cli-plugins.
I tried changing the ownership of /usr/local/lib/docker/cli-plugins using sudo chown $(whoami) /usr/local/lib/docker/cli-plugins then ran brew cleanup again but this got the same result.
It might be worth noting that I do not use the Docker application anymore and don't even have it installed anymore. So I was wondering if simply force removing the /docker directory using the rm -rf /usr/local/lib/docker/ command would help? Or would that do more harm than good?
I don't think there would be any issue of deleting or reinstalling /usr/local/lib/docker/. You should be always re-installing the right Docker app and brew link it for the use.
But before you are doing that, I'd recommend you to run brew doctor first.
I am using React Native which needs watchman. When running react-native run-ios, I see this error.
watchman --no-pretty get-sockname returned with exit code=1, signal=null,
stderr= 2017-05-05T08:17:49,256: [2110218240] while computing sockname:
failed to create /usr/local/var/run/watchman/foo-state: No such file or directory
After investigating this, it seems that it is caused by not having a standard /usr/local/ homebrew install.
Is their a way to change the statedir being used by watchman?
I was able to solve this issue by creating the directory and giving my user the ownership of the directory.
sudo mkdir /usr/local/var/run/watchman/foo-state
sudo chown -R myusername /usr/local/var/run/watchman/foo-state
From watchman --help:
--statefile=PATH Specify path to file to hold watch and trigger state
So I think you need to use the --statefile option.
The safest way to resolve this is to delete the state dir. Run rm -rf /usr/local/var/run/watchman/root-state. This resolved the same problem for me.
I'm trying to install a few things on my computer to run Rails projects. I was installing Homebrew and when I did the command brew doctor I received the following. I need some help to figure out whats going on.
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: /usr/local/Cellar isn't writable.
You should `chown` /usr/local/Cellar
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libecomlodr.dylib
And when trying to install Git I got this message
Error: Cannot write to /usr/local/Cellar
To enable write access to /usr/local/Cellar for the current user you should execute
sudo chown -R `whoami` /usr/local/Cellar
and, for the sake of consistence:
sudo chmod -R u+w /usr/local/Cellar
from the command line. The former sets the proper ownership; the latter permits the current user to write to the directory. But usually this message means there is something wrong with your environment in general, since you are supposed to have an access to this directory.
So I've been using homebrew to install various packages/libraries/programs on my mac. I keep running into a problem in which homebrew tells me that I have unlinked kegs in my Cellar.
For instance, upon running brew install phantomjs I received the following message:
Warning: Could not link phantomjs. 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 phantomjs'
Possible conflicting files are:
/usr/local/bin/phantomjs -> /usr/local/lib/node_modules/phantomjs/bin/phantomjs
I tried running brew link phantomjs as recommended, and hit a similar problem:
Error: Could not symlink file: /usr/local/Cellar/phantomjs/1.9.2/bin/phantomjs
Target /usr/local/bin/phantomjs already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
The command brew link --overwrite --dry-run phantomjs gives the following message:
Would remove:
/usr/local/bin/phantomjs -> /usr/local/lib/node_modules/phantomjs/bin/phantomjs
I will probably go ahead and overwrite, but this appears to happen every time I try to install something with homebrew. Why? Why isn't homebrew working as expected?
Thanks.
From what I can tell, looks like you have previously done:
% sudo npm install -g phantomjs
In this case, you should do the following:
% sudo npm uninstall -g phantomjs
% brew link --overwrite phantomjs
I thought I'd take a crack at this. I ran into a similar problem today, and I think it may be related to this:
https://github.com/Homebrew/homebrew/issues/22408
Long story short, I think it has to do with how npm manages packages vs how brew does it. (I'm assuming you installed node with its defaults, which would have given you npm).
At some point you probably installed some package with npm. Maybe grunt, karma, etc..those by default end up in /usr/local/lib/node_modules.
Maybe one of those packages or its dependencies(or sub-dependencies) depended on phantomjs (I think Karma might use phantomjs?) Anyways, if now you are trying to brew install phantomjs, which is trying to make a symlink to it, that may be conflicting with the already existing symlink that npm created for you..
I think you can change the symlink path for that package so that brew permanently points to that already installed package in the node_modules folder. Sorry not to be more specific, I'm just figuring this out myself.