Cannot install/link wget on macos - macos

I'm trying to install wget on macOS.
It's not installed already:
foo#foo-MacBook-Pro ros2_foxy % wget
zsh: command not found: wget
running brew install gives:
foo#foo-MacBook-Pro ros2_foxy % brew install wget
Warning: wget 1.20.3_2 is already installed, it's just not linked
You can use `brew link wget` to link this version.
so trying to link:
foo#foo-MacBook-Pro ros2_foxy % brew link wget
Linking /usr/local/Cellar/wget/1.20.3_2...
Error: Could not symlink share/locale/be/LC_MESSAGES/wget.mo
/usr/local/share/locale/be/LC_MESSAGES is not writable.
'''
how to fix this?

Related

Can't install imagemagick with brew on Mac OS X mavericks

I am using Homebrew v0.9.5 on my Mac OS X version 10.9.4
When I run the command: `brew install imagemagick, this error occurred.
$ brew install imagemagick
==> Installing dependencies for imagemagick: libpng, freetype
==> Installing imagemagick dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
I have added --disable-openmp option, it also doesn't go well.
$ brew install imagemagick --disable-openmp
brew doctor command result has no problem.
$ brew doctor
Your system is ready to brew.
Have you tried a
$ brew update
$ brew install imagemagick --disable-openmp --build-from-source
Apparently that seemed to fix it for me on Mac OS 10.8 (Mountain Lion). Previously I checked out the latest imagemagick brew recipe with "brew versions imagemagick" and "git checkout e68e443", see here and here
I'm not certain whether the source of my problem was the same as the OP's, however (though this has an accepted answer already) I'll post this in case this solution works for others.
Using brew install imagemagick, I would encounter the following error:
curl: (52) Empty reply from server Error: Failed to download resource
"libpng" Download failed:
https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz
Which is similar, if less specific than the OP's message.
As it turned out, I already had a previous version of libpng installed (version 1.5.7). I then ran:
brew upgrade libpng
Followed by another brew install libpng, and this time it succeeded, as it now had the correct version needed.
This problem also occurs because https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz has a badly configured SSL certificate. Open the link in your browser and see if your browser complains.
If that's the case, you can manually download the file to /Library/Caches/Homebrew and run again.
Source: https://github.com/Homebrew/homebrew/issues/36703
For me it was upgrading to El Capitan. I found the simplest solution was to force remove homebrew:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
then to re-install it:
sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
then install imageMajick:
brew install ImageMagick
Depending on your setup you may not want to sudo. For me, its fine. Enjoy a snack while you manipulate images.
In my case the url was simply not correct, with which homebrew wanted to download the required file. I looked it up here http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.16/ by myself and copied it to /Library/Caches/Homebrew like #Dan suggested.
I then run brew install libpng again and it worked.
Follow this:
brew install imagemagick#6
Add below lines in to ~/.bash_profile file
export LDFLAGS="-L/usr/local/opt/imagemagick#6/lib" export
CPPFLAGS="-I/usr/local/opt/imagemagick#6/include" export
PKG_CONFIG_PATH="/usr/local/opt/imagemagick#6/lib/pkgconfig"
Install Rmagick
source ~/.bash_profile
gem install rmagick
If you are an Anaconda/Miniconda user on Mac OSX or Linux, you can install packages like imagemagick using conda.
conda install -c conda-forge imagemagick
https://anaconda.org/conda-forge/imagemagick

Homebrew python3 installation error

I was trying to install python 3 using Homebrew by doing brew install python3 and there was the warning.
Warning: The post-install step did not complete successfully
You can try again using brew postinstall python3
So I did instead do brew postinstall python3
```==> /usr/local/Cellar/python3/3.4.1/bin/python3 -m ensurepip --upgrade
dyld: Library not loaded: ##HOMEBREW_CELLAR##/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/Python
Referenced from: /usr/local/Cellar/python3/3.4.1/bin/python3
Reason: image not found
xcrun: error: active developer path ("/Users/dorislee/Desktop/Macintosh HD/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select to change
xcrun: error: active developer path ("/Users/dorislee/Desktop/Macintosh HD/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select to change
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting```
I am not really sure what to do, is there a way to undo this and fix it?
You can try and uninstall brew remove python3 and then do brew cleanup and brew prune and then reinstall python3 brew install python3 with whatever flags you want.
Check your PYTHONPATH variable, clean it, and then try to install python3 anagin

uWSGI can not load libssl.1.0.0.dylib

When I call uwsgi, it always shows the following:
dyld: Library not loaded: libssl.1.0.0.dylib
Referenced from: /Users/xingshi/anaconda/bin/uwsgi
Reason: image not found
Trace/BPT trap: 5
Here is all the libssl.1.0.0.dylib on my Mac:
$ locate libssl.1.0.0.dylib
/Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib
/Library/PostgreSQL/9.2/pgAdmin3.app/Contents/Frameworks/libssl.1.0.0.dylib
/Users/xingshi/anaconda/lib/libssl.1.0.0.dylib
/Users/xingshi/anaconda/pkgs/openssl-1.0.1c-0/lib/libssl.1.0.0.dylib
/opt/local/lib/libssl.1.0.0.dylib
And my uwsgi is in anaconda
$which uwsgi
/Users/xingshi/anaconda/bin/uwsgi
Any ideas ?
MacPorts usually install softwares into /opt/local/, but brew will install softwares into /usr/local/. It seems that my uwsgi is looking for the libssl.1.0.0.dylib in /usr/local/lib, so I use brew to install openssl and relink it:
brew install --upgrade openssl
brew unlink openssl && brew link openssl --force
I performed this:
I have been having this error for a long time and performing
brew uninstall openssl
brew install openssl
did not work for me even including "--force"
However, I found this link to this blog and it did work for me.
http://mithun.co/hacks/library-not-loaded-libcrypto-1-0-0-dylib-issue-in-mac/
Step 1: Install openssl using brew
brew install openssl
Step 2: Copy copy libssl.1.0.0.dylib and
libcrypto.1.0.0.dylib
cd /usr/local/Cellar/openssl/1.0.1f/lib
sudo cp libssl.1.0.0.dylib libcrypto.1.0.0.dylib /usr/lib/
Note the bold folder name. There will be change in that depending on
your openssl version
Step 3: Remove the existing links
sudo rm libssl.dylib libcrypto.dylib
sudo ln -s libssl.1.0.0.dylib libssl.dylib
sudo ln -s libcrypto.1.0.0.dylib libcrypto.dylib
I hope this helps!
my error specifically for Mac OSx, was..
user-MacBook-Pro:src user$ uwsgi --enable-threads --ini deploy.ini
dyld: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/uwsgi
Reason: image not found
Abort trap: 6
user-MacBook-Pro:src user$
this suddenly started happening, either after upgrading Mac OSx to v10.14.6 or after an extensive installation process playing around with aircrack-ng (i'm not sure which)
but, the following fixed my issue... (help from https://stackoverflow.com/a/59055043/2298002)
$ brew update
$ brew upgrade
$ brew install openssl # yielded 'already installed'
$ brew reinstall uwsgi # yielded 'could not symlink' error
$ brew link --overwrite uwsgi
NOTE: uwsgi now works fine, but i still cannot run $ man uwsgi, yields...
user-MacBook-Pro:src user$ man uwsgi
No manual entry for uwsgi
user-MacBook-Pro:src user$
... anyone have any incites to this?

Homebrew link issue on Mac OS X (10.7.5)

I'm having issues troubleshooting a link problem when installing Homebrew. I'm attempting to install it on Mac OS X (10.7.5). I have been unable to find a solution and could use help. The error I'm receiving is below.
tone$ brew link wget
Linking /usr/local/Cellar/wget/1.14... Warning: Could not link wget. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/wget/1.14/share/man/man1/wget.1
Target /usr/local/share/man/man1/wget.1 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
I ran the following commands to get to this point
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
$ brew install wget

Library not loaded error (libidn.11.dylib) when trying to install Homebrew

Trying to install Homebrew on Lion. When I do:
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
I get this error:
dyld: Library not loaded: /opt/local/lib/libidn.11.dylib
Referenced from: /usr/local/bin/curl
Reason: image not found
I had MacPorts installed previously but uninstalled it and completely removed /opt/local
I also removed /opt/local from my PATH
Any idea why this error is happening?
You built and installed curl into /usr/local/bin, but it linked against your MacPorts-installed libidn. You should delete /usr/local/bin/curl. You may also want to double-check everything else in /usr/local/bin to see if they have the same problem.
You may also need to check things in /usr/local/lib in case they link against MacPorts-installed libraries too. For example, curl may have a /usr/local/lib/libcurl.dylib that might link against stuff from /opt/local/lib.
For me, running brew install libidn did the trick
Try $ brew reinstall curl , the curl dependency is reinstalled
cd /usr/local/opt/libidn2/lib/
ln -s libidn2.4.dylib libidn2.0.dylib
The following fixed the specific issue for me:
rm -f /usr/local/bin/curl
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
If you already have an older homebrew installed:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
Stash any unbrewed files:
cd /usr/local/Library && git stash && git clean -f
brew doctor:
Install xcode cli tools from http://connect.apple.com.

Resources