I ran the following command to clone iHaskell repository:
git clone https://github.com/gibiansky/IHaskell
And then attempted to installl the kernel
ihaskell install --stack
Error:
zsh: permission denied: ihaskell
After running:
sudo ihaskell install --stack
I get:
sudo: ihaskell: command not found
So, how can I install iHaskell kernel on macOS Ventura ?
EDIT: After interchanging some comment with a user, I realised that I missed a step in my explanation.
I cloned the repository:
git clone https://github.com/gibiansky/IHaskell
I moved to that folder
cd IHaskell
and attempted
./ihaskell install --stack
Error:
zsh: no such file or directory: ./ihaskell
What am I missing ?
Related
This question already exists:
home brew says no such file or directory [closed]
Closed 7 months ago.
I'm fairly new to bash's sudo commands etc. I recently wanted to upgrade my psql and when i tried to brew install it, it was not happening. Turns out that brew itself had stopped supporting my old version of mac os in 2021. Meaning I couldn't do anything with brew. Only first time when i ran brew update it gave me the following:
$brew update
warning: unable to unlink .gitignore: Permission denied
warning: unable to unlink .yardopts: Permission denied
warning: unable to unlink CODEOFCONDUCT.md: Permission denied
warning: unable to unlink CONTRIBUTING.md: Permission denied
warning: unable to unlink LICENSE.txt: Permission denied
warning: unable to unlink SUPPORTERS.md: Permission denied
error: unable to unlink old 'README.md' (Permission denied)
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
'brew update' , 'brew install' or 'brew doctor' - nothing worked. after that when ever i try, i get No such file or directory:
$brew install postgresql#12
-bash: /usr/local/bin/brew: No such file or directory
Wanted to know if bash has commands that can be used to upgrade my psql version? if yes, how?
To me it seems more like a permission problem, have you tried prepending sudo to brew update?
I have been struggling with this for a few hours. I am on a Mac using Yosemite. I had homebrew installed, and was using git just fine. I tried doing $git add -i and I got this error:
Can't locate Git.pm in #INC (#INC contains:
So I followed the instructions here:
Can't locate Git.pm in #INC
$brew uninstall git worked fine, but after I tried to $brew install git I've been stuck in a terrible cycle.
% brew install git
Error: git-git already installed
To install this version, first `brew unlink git'
% brew unlink git
Error: No such keg: /usr/local/Cellar/git
% brew link git
Error: No such keg: /usr/local/Cellar/git
% git --version
git version 1.9.3 (Apple Git-50)
% brew upgrade git
==> Upgrading 1 outdated package, with result:
git 2.2.2
Error: /usr/local/Library/LinkedKegs/git is not a valid keg
% brew install git
Error: git-git already installed
To install this version, first `brew unlink git'
%
I just want to get homebrew & git back to normal and linked to the correct repo again. I'm really rough around the edges at this stuff, so any help would be greatly appreciated!
Give another go at force removing the brewed version of git
brew uninstall --force git
Then cleanup any older versions and clear the brew cache
brew cleanup -s git
Remove any dead symlinks
brew cleanup --prune-prefix
Then try reinstalling git
brew install git
If that doesn't work, I'd remove that installation of Homebrew altogether and reinstall it. If you haven't placed anything else in your brew --prefix directory (/usr/local by default), you can simply rm -rf $(brew --prefix). Otherwise the Homebrew wiki recommends using a script at https://gist.github.com/mxcl/1173223#file-uninstall_homebrew-sh
Had a similar issue while installing "Lua" in OS X using homebrew. I guess it could be useful for other users facing similar issue in homebrew.
On running the command:
$ brew install lua
The command returned an error:
Error: /usr/local/opt/lua is not a valid keg
(in general the error can be of /usr/local/opt/ is not a valid keg
FIXED it by deleting the file/directory it is referring to, i.e., deleting the "/usr/local/opt/lua" file.
root-user # rm -rf /usr/local/opt/lua
And then running the brew install command returned success.
Os X Mojave 10.14 has:
Error: The Command Line Tools header package must be installed on
Mojave.
Solution. Go to
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
location and install the package manually. And brew will start working and we can run:
brew uninstall --force git
brew cleanup -s git
brew cleanup --prune-prefix
brew install git
Hi I just tried installing git via homebrew on my mac - something is wrong. I had the github for mac app installed, but I tried removing that. The current git version in my system is:
Nielsk#~: $ git --version
git version 1.9.3 (Apple Git-50)
This is what happens if I try to install git via homebrew:
Nielsk#~: $ brew install git
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/git-2.1.3.y
######################################################################## 100,0%
==> Pouring git-2.1.3.yosemite.bottle.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain
The 'contrib' directory has been installed to:
/usr/local/share/git-core/contrib
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completion has been installed to:
/usr/local/share/zsh/site-functions
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied - /usr/local/lib/perl5/site_perl/5.18.2
Error: Permission denied - /usr/local/lib/perl5/site_perl/5.18.2
How can I solve this?
I also met the same issue. I think we should change the readable permission to make sure any of the directories is readable by "all". So I tried the command: sudo chown -R $USER:admin /usr/local
and then: brew link --overwrite git It works for me, hope it will also work for you.
From High Sierra, chown of /usr/local is not allowed. However you can still change permission the sub directories in /usr/local.
In my case, I had to create Frameworks in /usr/local and sudo chown -R $(whom) Frameworks. After that follow what brew doctor says.
The better way is to create subdirectory whatever you need and run
sudo chown -R $(whoami) $(brew --prefix)/*
For those with the new El Capitan OS, you'll need to update your permissions:
Open Terminal and type the following commands:
$ sudo chown -R $(whoami):admin /usr/local
$ brew doctor
$ brew update
$ brew link --overwrite git
The above solution will work for other brew installs like node, etc. Just replace the last line if you started the installation but encountered errors during the brew installation.
I had a similar permission denied error on install of git until I cleaned things up:
$brew doctor
..... << long output of issues, so you run:
$brew prune
$brew doctor
..... << less issues now, so manually clean up
$brew update
$brew install git
Does that address your error as well?
I did what brew doctor recommended and it helped:
sudo mkdir -p /usr/local/sbin
sudo chown -R $(whoami) /usr/local/sbin
MacOS 10.14.4
I did brew update and got a error message
Your local changes to the following files would be overwritten by merge
I've searched previous posts for a workaround and I tried a host of suggested remedies but none worked. A problem is when I fired eg. git reset --hard FETCH_HEAD I got;
error: unable to unlink old 'README.md' (Operation not permitted)
fatal: Could not reset index file to revision 'FETCH_HEAD'.
I used sudo chmod and chown to change a file ownership and permission but I got the same error, "Operations not permitted".
here is an output of my brew --config;
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: f550366b94ab3022d325c9f5bcad496993d80c37
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit
ivybridge OS X: 10.9.3-x86_64
Xcode: 5.1.1 CLT: 5.1.0.0.1.1396320587
Clang: 5.1 build 503 X11: 2.7.5 => /opt/X11 System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/local/bin/python =>/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby
The brew doctor had warnings indicating my /usr/local is not writeable but I had not have any problem using brew until today.
Any help will be appreciated.
Try the following:
cd $(brew --prefix)
git fetch origin
git reset --hard origin/master
brew cleanup --force
brew update
I've got a permission error with Homebrew ported to linux via this handy how-to:
http://blog.frameos.org/2010/11/10/mac-homebrew-ported-to-linux/comment-page-1/#comment-2208
I’ve got the same problem:
> $ brew update –verbose
>
> git checkout -q master fatal: Unable to create
> ‘/opt/homebrew/.git/index.lock’: Permission denied Error: Failure
> while executing: git checkout -q master
Tried changing the file permission on the ‘index’ file, no luck. My final goal is to be able to install freetds and tinytds on my Ubuntu server (brew install freetds) so if there's another way to do so please lemme know!
Sorry, the small tutorial was horribly broken...
In a nutshell:
sudo apt-get install build-essential
sudo mkdir /opt/homebrew
sudo chown `whoami` -R /opt/homebrew
git clone git://github.com/rubiojr/homebrew.git /opt/homebrew
Looks like you need to fix permissions when running with an unprivileged user?
chown -R `whoami` /opt/homebrew
Let me know if that helps.