I am trying to install apertium-eng-ita package from source (available at https://github.com/apertium/apertium-eng-ita). The system is debian 11 (i tried also on fresh ubuntu, get the same error). So i downloaded all the files into my /root directory (/root/eng-ita contents all the files from provided link) and run:
./autogen.sh
This generated all the necessary files inside the "eng-ita" folder, including "Makefile". But then i run:
make
and see errors like:
apertium-validate-dictionary apertium-eng-ita.eng-ita.dix /bin/bash:
apertium-validate-dictionary: command not found make: ***
[Makefile:769: eng-ita.autobil.bin] Error 127
I began googling (for example, here is some info - https://wiki.apertium.org/wiki/Installation_troubleshooting) this 127 error and found some information about PATH, but where i can put this PATH to make it work?
If you're installing from source, you should first add the apt source and install apertium-all-dev which will give you make etc. Cf. https://wiki.apertium.org/wiki/Prerequisites_for_Debian you should
curl -sS https://apertium.projectjj.com/apt/install-nightly.sh | sudo bash
sudo apt-get -f install locales build-essential automake subversion git pkg-config \
gawk libtool apertium-all-dev
(But you don't need to install from source if you just want to use the pair and not develop for it. There are nightly debian packages of the latest git commit; after running the first command you can get that package with sudo apt install apertium-eng-ita)
I've installed hping app via homebrew.
When I do brew list I get this response:
$ brew list
.... ... .... hping ... .... ...
however when I run my hping this happens.
$ hping
zsh: command not found: hping
and also this:
$ brew info hping
hping: stable 3.20051105
http://www.hping.org/
/usr/local/Cellar/hping/3.20051105 (9 files, 196K) *
Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/hping.rb
I tried reinstalling it but it doesn't work. Very weird how this is possible. Couldn't find anything related to this. Any ideas ?
Add /usr/local/sbin to $PATH.
hping binaries are installed in /usr/local/sbin, not in /usr/local/bin.
EDIT: As #veslam says, you can add sbin by PATH=$PATH:/usr/local/sbin.
Note: I'm not so good at using shell.
I was trying to install Valgrind using brew on Yosemite.
brew install --HEAD valgrind
Towards the end, I got an error having to do with linking so when I tried to reinstall, I got:
Warning: valgrind-HEAD already installed, it's just not linked
So apparently I've already installed it. Then based on other SO questions and answers, I tried:
brew link valgrind
This seemed to solve other people's problems with linking an already installed software but this gave me an error:
Linking /usr/local/Cellar/valgrind/HEAD...
Error: Could not symlink lib/pkgconfig/valgrind.pc
/usr/local/lib/pkgconfig is not writable.
I also tried to update brew but it didn't solve the issue. If it is not writable, maybe sudo would give me permission but I don't want to use sudo without knowing exactly what I am doing.
What is happening and how to I fix it?
Looks like a permission issue. I would try doing this
chmod 755 /usr/local/lib/pkgconfig
This should make that available, then try
brew link valgrind
If that doesn't work I would try doing a check on it
brew doctor
First run
brew link <package>
If it gives an error, try for an automated diagnosis
brew doctor
brew doctor gives a list of problems that could be leading to errors in installation process.
To fix problems in case of conflicting files,
run to get a list of all actions which will be performed by overwrite without actually performing them.
To list all files that would be deleted:
brew link --overwrite --dry-run <package>
followed by this run which will execute the overwrite, assuming you feel that the actions performed by overwrite will take your system to a more stable state.
To force the link and overwrite all conflicting files:
brew link --overwrite <package>
If none of above the solution works, try this.
sudo chown -R $USER:admin /usr/local
brew link <package-name>
In my case, brew doctor got it right. At some point /usr/local/lib/pkgconfig was set to be owned by root rather than my account. The prescribed remedy worked -
sudo chown -R $(whoami) /usr/local/lib/pkgconfig
I had same problem and i resolved with next solution:
Run brew doctor from Terminal to check all your errors
then run next command:
sudo chown -R $USER:admin /usr/local/bin /usr/local/etc /usr/local/sbin /usr/local/share
after run:
brew link <package_name>
Type
link valgrind
It will show an error that it can't be linked because such-and-such directory is not writable. Cool, we make it writable now. Type
sudo chmod a+w the/directory/shown/as/error
If the directory is not writable, you wont be able to change its permission and make it writable either. Sudo will make this operation possible. chmod will change the mode and will make all(a) users be able to write(w) it.
Next you will be prompted to type your system's password. After this, again type
link valgrind
and it will work this time.
Here is what I tried and it worked:
$ brew link --overwrite sdl
Linking /usr/local/Cellar/sdl/1.2.15...
Error: Could not symlink lib/pkgconfig/sdl.pc
/usr/local/lib/pkgconfig is not writable.
Looked for pkgconfig: (after chmod 750)
drwxr-xr-x 4 root wheel 136B Mar 30 2013 pkgconfig
I tried chown as below:
$ sudo chown -R avkashchauhan:admin /usr/local/lib/pkgconfig
it should look like as below:
drwxr-xr-x 4 avkashchauhan admin 136B Mar 30 2013 pkgconfig
After I tried it:
$ brew link sdl
Linking /usr/local/Cellar/sdl/1.2.15... 182 symlinks created
brew install cocoapods --build-from-source
brew link --overwrite cocoapods
The only commands that worked for me on after upgrading to MAC OS Mojave 10.14.6
I got a similar problem,
$ brew install sqlite
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.
Warning: sqlite-3.17.0 already installed, it's just not linked.
I tried to link it,
$ brew link sqlite
Warning: sqlite is keg-only and must be linked with --force
Note that doing so can interfere with building software.
Then do it by force,
$ brew link --force sqlite
Linking /usr/local/Cellar/sqlite/3.17.0... 8 symlinks created
I had same a problem about permission, but after I give my permission, still error permission. And here I do, first:
brew unlink valgrind
and then,
brew link valgrind
hope this help.
I had the similar issue. I needed to brew link carthage.
But none of answers worked for me.
I've also seen the next error for any command I tried:
Error: Could not symlink .
/usr/local/opt is not writable
Only one solution helped:
Open the Finder;
Command + Shift + G;
Pass the /usr/local path;
Create opt folder manually (that was the folder name from my error message, but in your case it can be something different, such as lib/pkgconfig in the original question, so check yours in the Terminal);
re-run your command again.
How do I uninstall AVBIN on Mac? I've looked every where on the web to find my answer. By the way I want it uninstalled so I can use pyglet.
It looks like there is no official uninstall, so we need to discover it.
pkgutil --pkgs
Then you search for avbin, I found: com.github.avbin.avbin10.libavbin.10.pkg. A better way of searching:
pkgutil --pkgs | grep avbin
Now you can do
pkgutil --pkg-info com.github.avbin.avbin10.libavbin.10.pkg
You should get this:
package-id: com.github.avbin.avbin10.libavbin.10.pkg
version: 10
volume: /
location: usr/local/lib
install-time: <time>
Then cd to the install location.
cd /usr/local/lib
And list the packages files.
pkgutil --files com.github.avbin.avbin10.libavbin.10.pkg
This gives:
._libavbin.10.dylib
libavbin.10.dylib
So now we can do
sudo rm ._libavbin.10.dylib
sudo rm libavbin.10.dylib
You will need to enter password. If you want to be 100% sure, then you can do:
sudo rm *libavbin*
That will delete everything with libavbin in it (In the folder you are, /usr/local/lib)
And finaly
sudo pkgutil --forget com.github.avbin.avbin10.libavbin.10.pkg
It should give:
Forgot package 'com.github.avbin.avbin10.libavbin.10.pkg' on '/'.
I'm having some trouble with brew which I'm trying to solve. When I currently run brew doctor I get the following output:
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:
autoconf
libevent
Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so
echo export PATH="/usr/local/sbin:$PATH" >> ~/.bash_profile
So I went ahead and tried all the suggestions. First brew link autoconf, which results in:
Linking /usr/local/Cellar/autoconf/2.69... Warning: Could not link autoconf. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/autoconf/2.69/share/emacs/site-lisp/autotest-mode.elc
Target /usr/local/share/emacs/site-lisp/autotest-mode.elc 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
So again I tried the suggested command: brew link --overwrite autoconf:
Linking /usr/local/Cellar/autoconf/2.69... Warning: Could not link autoconf. Unlinking...
Error: Permission denied - /usr/local/share/emacs/site-lisp/autotest-mode.elc
My initial response to a permission denied is usually prepending it with sudo, which leads brew to tell me: Error: Cowardly refusing tosudo brew link`.
When trying brew link libevent I get the same results as with brew link autoconf.
Finally, I tried solving the sbin that was not found by running the suggested echo export PATH="/usr/local/sbin:$PATH" >> ~/.bash_profile. This runs without error, but when I run brew doctor again, the message still appears.
Does anybody know how I can solve these issues? All tips are welcome!
The general problem here is that autoconf and libevent are already installed on your system, and they are in your homebrew "Cellar" as well. Thus there are TWO copies of autoconf on your system, and TWO copies of libevent on your system.
What homebrew is trying to do is delete the previously install (system wide) version of these libraries, and replace all the relevant REAL files with symlinks from the homebrew Cellar. That would give homebrew full control over upgrading and managing these libraries for you. It would also give you just one copy of these libraries available in two places.
The problem is that homebrew doesn't have unix permissions to delete these REAL files, and you'll need to do it yourself. Here's how for autoconf:
$ sudo rm /usr/local/share/emacs/site-lisp/autotest-mode.elc
$ sudo chmod 777 /usr/local/share/emacs/site-lisp/
$ sudo rm -rf /usr/local/share/autoconf
$ brew link --overwrite autoconf
You should see:
Linking /usr/local/Cellar/autoconf/2.69... 21 symlinks created
UPDATE I just noticed the part about sbin. I'm not sure how this problem happened originally, but I can explain how to fix it.
The fix recommended by homebrew (ECHO ...) only takes effect when you next login to your Mac. To have this change take effect now, you have to force your terminal to re-read the .bash_profile file. Just $ source ~/.bash_profile after you run the ECHO command provided by homebrew.
Since this question is a few months old now, you probably already discovered that this error message has gone away.
Run the following commands to grant the privileges:
$ sudo chown -R $(whoami) /usr/local
Once the privileges are granted, now they have to be just linked since it is already installed:
$ brew link autoconf
$ brew link libevent
You may want to change writing permissions with chmod on /usr/local/share/emacs/site-lisp/autotest-mode.elc
After that you should get something like this:
Linking /usr/local/Cellar/autoconf/2.69... 21 symlinks created