Trouble with brew install devil - homebrew

RGBDSLAM install is asking for devil
$ rosdep install rgbdslam
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rgbdslam: No definition of [libdevil-dev] for OS [osx]
But when I try to install devil I'm getting this:
$ brew install devil
Error: devil cannot be built with any available compilers.
To install this formula, you may need to:
brew install gcc
$ brew install gcc
Warning: gcc-5.3.0 already installed
How can I get around this?
Note: I have xcode installed accompanied with the command line tools.
** EDIT libdevIL installed **
for some reason gcc 5 doesn't register when devIL is looking for gcc so I had to downgrade to 4.9.
$ brew rm gcc // removes 5
$ brew install gcc49 // installs 4.9
$ brew install devil // works
$ brew install gcc // two gcc installed? this might be interesting
rgbdslam still isn't detecting libdevIL though, not sure what the deal is.

Here's some helpful notes from answers.ros.org
I set siftgpu_disable_devil = 0 in SiftGPU/makefile and
set(ENV{SIFT_GPU_MODE} 0) in CMakeLists.txt with no avail. I'm
still seeing rgbdslam: No definition of [libdevil-dev] for OS [osx]
Commenting devIL out in package.xml put me a little further but
into some seemingly OSX specific issues, trying to resolve those via
github. Will respond here once I have a solution. Thanks for your
assistance.

Related

Ruby and Homebrew error "Refusing to link: openssl" [duplicate]

I'm on: OSX 10.11.6, Homebrew version 0.9.9m OpenSSL 0.9.8zg 14 July 2015
I'm trying to play with with dotnetcore and by following their instructions,
I've upgraded/installed the latest version of openssl:
> brew install openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2h_1.el_capitan.bottle.tar.gz
Already downloaded: /Users/administrator/Library/Caches/Homebrew/openssl-1.0.2h_1.el_capitan.bottle.tar.gz
==> Pouring openssl-1.0.2h_1.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
But when I try to link openssl I continue to run into this linking error:
> brew link --force openssl
Warning: Refusing to link: openssl
Linking keg-only OpenSSL means you may end up linking against the insecure,
deprecated system version while using the headers from the Homebrew version.
Instead, pass the full include/library paths to your compiler e.g.:
-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
The option to include compiler flags doesn't make sense to me, since I'm not compiling these libraries that I'm dependent on.
EDIT dotnetcore has updated their instructions:
brew update
brew install openssl
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
This is what worked for me:
brew update
brew install openssl
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/local/bin/openssl
Thanks to #dorlandode on this thread https://github.com/Homebrew/brew/pull/597
NB: I only used this as a temporary fix until I could spend time correctly installing Openssl again from scratch. As I remember I spent best part of a day debugging and having issues before I realised the best way was to manually install the certs I needed one by one. Please read the link in #bouke's comment before attempting this.
As the update to the other answer suggests, the workaround of installing the old openssl101 brew will no longer work. For a right-now workaround, see this comment on dotnet/cli#3964.
The most relevant part of the issue copied here:
I looked into the other option that was suggested for setting the rpath on the library. I think the following is a better solution that will only effect this specific library.
sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.Security.Cryptography.Native.dylib
and/or if you have NETCore 1.0.1 installed perform the same command for 1.0.1 as well:
sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/System.Security.Cryptography.Native.dylib
In effect, rather than telling the operating system to always use the homebrew version of SSL and potentially causing something to break, we're telling dotnet how to find the correct library.
Also importantly, it looks like Microsoft are aware of the issue and and have both a) a somewhat immediate plan to mitigate as well as b) a long-term solution (probaby bundling OpenSSL with dotnet).
Another thing to note: /usr/local/opt/openssl/lib is where the brew is linked by default:
13:22 $ ls -l /usr/local/opt/openssl
lrwxr-xr-x 1 ben admin 26 May 15 14:22 /usr/local/opt/openssl -> ../Cellar/openssl/1.0.2h_1
If for whatever reason you install the brew and link it in a different location, then that path is the one you should use as an rpath.
Once you've update the rpath of the System.Security.Cryptography.Native.dylib libray, you'll need to restart your interactive session (i.e., close your console and start another one).
None of these solutions worked for me on OS X El Capitan 10.11.6. Probably because OS X has a native version of openssl that it believes is superior, and as such, does not like tampering.
So, I took the high road and started fresh...
Manually install and symlink
cd /usr/local/src
If you're getting "No such file or directory", make it:
cd /usr/local && mkdir src && cd src
Download openssl:
curl --remote-name https://www.openssl.org/source/openssl-1.0.2h.tar.gz
Extract and cd in:
tar -xzvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
Compile and install:
./configure darwin64-x86_64-cc --prefix=/usr/local/openssl-1.0.2h shared
make depend
make
make install
Now symlink OS X's openssl to your new and updated openssl:
ln -s /usr/local/openssl-1.0.2h/bin/openssl /usr/local/bin/openssl
Close terminal, open a new session, and verify OS X is using your new openssl:
openssl version -a
Just execute brew info openssland read the information where it says:
If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
If migrating your mac breaks homebrew:
I migrated my mac, and it unlinked all my homebrew installs - including OpenSSL. This broke gem install, which is how I first noticed the problem and started trying to repair this.
After a million solutions (when migrating to OSX Sierra - 10.12.5), the solution ended up being comically simple:
brew reinstall ruby
brew reinstall openssl
Edit much later: as Gal Bracha noted in the comments, you ?might? need to delete /usr/local/opt/openssl before doing the reinstalls, just to be safe. I didn't need to at the time, but if you're still having trouble, give that a try.
After trying everything I could find and nothing worked, I just tried this:
touch ~/.bash_profile; open ~/.bash_profile
Inside the file added this line.
export PATH="$PATH:/usr/local/Cellar/openssl/1.0.2j/bin/openssl"
now it works :)
Jorns-iMac:~ jorn$ openssl version -a
OpenSSL 1.0.2j 26 Sep 2016
built on: reproducible build, date unspecified
//blah blah
OPENSSLDIR: "/usr/local/etc/openssl"
Jorns-iMac:~ jorn$ which openssl
/usr/local/opt/openssl/bin/openssl
The solution above from edwardthesecond worked for me too on Sierra
brew install openssl
cd /usr/local/include
ln -s ../opt/openssl/include/openssl
./configure && make
Other steps I did before were:
installing openssl via brew
brew install openssl
adding openssl to the path as suggested by homebrew
brew info openssl
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
I have a similar case. I need to install openssl via brew and then use pip to install mitmproxy. I get the same complaint from brew link --force. Following is the solution I reached: (without force link by brew)
LDFLAGS=-L/usr/local/opt/openssl/lib
CPPFLAGS=-I/usr/local/opt/openssl/include
PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
pip install mitmproxy
This does not address the question straightforwardly. I leave the one-liner in case anyone uses pip and requires the openssl lib.
Note: the /usr/local/opt/openssl/lib paths are obtained by brew info openssl
This worked for me:
brew install openssl
cd /usr/local/include
ln -s ../opt/openssl/include/openssl .
By default, homebrew gave me OpenSSL version 1.1 and I was looking for version 1.0 instead. This worked for me.
To install version 1.0:
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Then I tried to symlink my way through it but it gave me the following error:
ln -s /usr/local/Cellar/openssl/1.0.2t/include/openssl /usr/bin/openssl
ln: /usr/bin/openssl: Operation not permitted
Finally linked openssl to point to 1.0 version using brew switch command:
brew switch openssl 1.0.2t
Cleaning /usr/local/Cellar/openssl/1.0.2t
Opt link created for /usr/local/Cellar/openssl/1.0.2t
I had the same problem while trying to install newer version of ruby 2.6.5
https://github.com/kelaberetiv/TagUI/issues/86 helps me to solve the problem. This if for macOS catalina Version 10.15.1
Basically, I did update and upgrade homebrew and install openssl and install ruby.
brew update && brew upgrade
brew install openssl
Then create these 2 symlinks
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
then installed ruby 2.6.5
Note: this no longer works due to https://github.com/Homebrew/brew/pull/612
I had the same problem today. I uninstalled (unbrewed??) openssl 1.0.2 and installed 1.0.1 also with homebrew. Dotnet new/restore/run then worked fine.
Install openssl 101:
brew install homebrew/versions/openssl101
Linking:
brew link --force homebrew/versions/openssl101
for me this is what worked...
I edited the ./bash_profile and added below command
export PATH="/usr/local/opt/openssl/bin:$PATH"
export https_proxy=http://127.0.0.1:1087 http_proxy=http://127.0.0.1:1087 all_proxy=socks5://127.0.0.1:1080
works for me
and I think it can solve all the problems like
Failed to connect to raw.githubusercontent.com port 443: Connection refused
The solution might be updating some tools.
Here's my scenario from 2020 with Ruby and Python:
I needed to install Python 3 on Mac and things escalated. In the end, updating homebrew, node and python lead to the problem with openssl. I did not have openssl 1.0 anymore, so I couldn't "brew switch" to it.
So what was still trying to use that old 1.0 version?
It tuned out it was Ruby 2.5.5.
So I just installed Ruby 2.5.8 and removed the old one.
Other things you can try if this is not enough: Use rbenv and pyenv. Clean up gems and formulas. Update homebrew, node, yarn. Upgrade bundler. Make sure your .bash_profile (or equivalent) is set up according to each tool's instructions. Reopen the terminal.

brew install gfortran Error: You must `brew link gmp' before gfortran can be installed

I tried installing gfortran using homebrew before I needed to install pythonbrew. I need pythonbrew to install and use the misopy package on my iMac. I keep getting this error when I want to install gfortran:
> brew install gfortran
Error: You must `brew link gmp' before gfortran can be installed
I tried reinstalling gmp using homebrew in mac and this did not help. Can someone help me in this regard?
Ok, I solved the problem. I did not completely remove the swig/gfortran/libpng files and their dependecies. If this information helps others installing pythonbrew and python 2.7 in mac.
I followed this guys instruction to start with in first place:
https://gist.github.com/audy/4012573
Do not mind his swearing I can understand where that comes from! :-)
KR

gfortran error while installing using homebrew

Any help with this problem which I faced while trying gfortran using homebrew. Thank you very much in advance.
bash-3.2$ brew install gfortran
Warning: gfortran-4.8.0 already installed, it's just not linked
bash-3.2$ brew link gfortran
Linking /usr/local/Cellar/gfortran/4.8.0... Warning: Could not link gfortran. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/gfortran/4.8.0/share/gcc-4.8.0/python
/libstdcxx/v6/printers.py
Target /usr/local/share/gcc-4.8.0/python/libstdcxx/v6/printers.py already exists.
You may need to delete it.
To force the link and delete this file, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
bash-3.2$
This looks like another GCC 4.8 installation, either from Homebrew or elsewhere, is conflicting with the gfortran install. GFortran is based on GCC so they can collide.
The gcc48 Homebrew formula looks like it has an undocumented conflict with gfortran. Both want to symlink /usr/local/share/gcc-4.8.0. I was able to reproduce your error with brew tap homebrew/versions; brew install gcc48; brew install gfortran
Head on over to the Homebrew issue tracker on GitHub and report this conflict as a bug.
As a workaround, if you don't need that GCC 4.8.0, either brew unlink gcc48 (if it's from homebrew) or uninstall it, and then try the gfortran install again.
UPDATE: Looks like the Homebrew folks are already aware of this issue. There is a fix for it included in this pull request (#19382).

Error installing CouchDB with homebrew osx 10.8 - skip dependency?

So I tried to install it according to the directions on couchdb wiki. and I get the following issue
Installing couchdb dependency: erlang-r15
==> Downloading https://github.com/erlang/otp/archive/OTP_R15B03-1.tar.gz
Already downloaded: /Library/Caches/Homebrew/erlang-r15-R15B03-1.tar.gz
Error: SHA1 mismatch
Expected: 5ba866722de79956b06966c232490d32bb7ba0a6
Actual: 7843070f5d325f95ef13022fc416b22b6b14120d
Archive: /Library/Caches/Homebrew/erlang-r15-R15B03-1.tar.gz
Is there anyway to tell brew to skip this dependency since I have already installed the correct version of erlang, and it can't see it?
Did you try brew uninstall couchdb and re install after?
I had the same issue, it fixed it for me
So to get this working I followed the instruction on the couchdb until the install couchdb command:
brew remove --force openssl erlang couchdb icu4c spidermonkey nspr
brew update
brew outdated
brew rm --force erlang
cd /usr/local
git checkout 168742f Library/Formula/erlang.rb
brew install erlang
since I knew I had the right erlang installed I altered the Bew formula to make it work correctly.
So I headed over to the formula at
vim /usr/local/Library/Formula/couchdb.rb
And altered the dependency line
depends_on 'erlang-15'
to
depends_on 'erlang'
and works great now!!
None of the solutions here worked for me, but the below did. Note, I had to build with unixodbc.
brew remove --force openssl erlang couchdb icu4c spidermonkey
brew update
brew install unixodbc
brew install homebrew/versions/erlang-r15 --with-unixodbc
# edit /usr/local/Library/Formula/couchdb.rb to change depends_on to 'erlang-r15'
brew install couchdb
You may want to first try force removing only erlang and couchdb -- as someone in this thread mentioned that force removing packages messed up his system (though I did not encounter this problem when running the above instructions).

Error installing openCV 2.3.0 / 2.3.1 on mac os X 10.6.8

I am trying since two days to install OpenCV 2.3.0 or 2.3.1 on my mac 10.6.8 snow leopard. I followed the following commands
$ cd /Users/ateendra/Desktop/OpenCV-2.3.0/
$ mkdir build
$ cd build/
$ cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C/CXX_FLAGS=-m32 ..
$ ccmake .
$ make -j8
$ sudo make install
now i get the following errors
/Users/ateendra/Desktop/OpenCV-2.3.0/modules/highgui/src/grfmt_exr.hpp:83: error: reference to ‘PixelType’ is ambiguous
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers /QuickdrawTypes.h:193: error: candidates are: typedef SInt8 PixelType
/opt/local/include/OpenEXR/ImfPixelType.h:49: error: enum Imf::PixelType
/Users/ateendra/Desktop/OpenCV-2.3.0/modules/highgui/src/grfmt_exr.hpp:83: error: ‘PixelType’ does not name a type
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/loadsave.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Well, this is a common problem to compile opencv under mac os, though it is usually solvable by modifying opencv sources a bit. (I faced this problem twice, and I always changed sources a bit to make everything compile).
However, the last time I was installing opencv, I've just used brew:
brew install opencv
Didn't have any problems with it.
I've managed to install OpenCV 2.3.1 on OSX 10.6.8, but I've done it using MacPorts, (which I recommend as it deals with dependencies and building for you):
Make sure you've got Apple Developer Tools installed (or at least XCode with the command line tools)
Install MacPorts (if you haven't done so already)
Install OpenCV via MacPorts:
sudo port install opencv
For more details see Build via MacPorts on the wiki.
I also have to mention that I did run into an error, but that was because of a previous existing dylib in the wrong place.

Resources