Closed JakeGoodall closed 7 years ago
I'm glad to hear that you find Linuxbrew useful!
Warning: Setting LD_* vars can break dynamic linking.
Set variables:
LD_LIBRARY_PATH: /opt/ohpc/pub/mpi/openmpi-gnu/1.10.4/lib:/opt/ohpc/pub/compiler/gcc/5.4.0/lib64
is the most common culprit to breaking things. As a sanity check, please report the output of…
env -u LD_LIBRARY_PATH brew fetch -v hello
Please also report the output of…
brew list --versions openssl curl
brew linkage curl
brew postinstall openssl
which -a curl
curl --version
ldd $(which curl)
Thanks for getting back to me so quickly. Outputs are as follows:
env -u LD_LIBRARY_PATH brew fetch -v hello
==> Downloading https://linuxbrew.bintray.com/bottles/hello-2.10.x86_64_linux.bottle.tar.gz
Already downloaded: /users/home/jake/.cache/Homebrew/hello-2.10.x86_64_linux.bottle.tar.gz
SHA256: f81d7c0a3eee9fd62ebdecf685fbc5284e40d4a61c372d554fd45719e52a43cc
==> Verifying hello-2.10.x86_64_linux.bottle.tar.gz checksum
$ brew list --versions openssl curl
openssl 1.0.2l
curl 7.55.1
$ brew linkage curl
Homebrew libraries:
/users/home/jake/lib/libcurl.so.4 (curl)
/users/home/jake/lib/libc.so.6 (glibc)
/users/home/jake/lib/libpthread.so.0 (glibc)
/users/home/jake/lib/libcrypto.so.1.0.0 (openssl)
/users/home/jake/lib/libssl.so.1.0.0 (openssl)
/users/home/jake/lib/libz.so.1 (zlib)
Possible undeclared dependencies:
zlib
$ brew postinstall openssl
==> Postinstalling openssl
==> Downloading https://curl.haxx.se/ca/cacert-2017-01-18.pem
Already downloaded: /users/home/jake/.cache/Homebrew/openssl--cacert-2017-01-18.pem
$ which -a curl
~/bin/curl
/bin/curl
curl --version
Illegal instruction
$ ldd $(which curl)
linux-vdso.so.1 (0x00007ffeec9d4000)
libcurl.so.4 => /users/home/jake/lib/libcurl.so.4 (0x00007f4f0dd84000)
libssl.so.1.0.0 => /users/home/jake/lib/libssl.so.1.0.0 (0x00007f4f0db11000)
libcrypto.so.1.0.0 => /users/home/jake/lib/libcrypto.so.1.0.0 (0x00007f4f0d6bb000)
libz.so.1 => /users/home/jake/lib/libz.so.1 (0x00007f4f0d4a6000)
libpthread.so.0 => /users/home/jake/lib/libpthread.so.0 (0x00007f4f0d289000)
libc.so.6 => /users/home/jake/lib/libc.so.6 (0x00007f4f0ceea000)
libdl.so.2 => /users/home/jake/.linuxbrew/lib/libdl.so.2 (0x00007f4f0cce6000)
/users/home/jake/lib/ld.so (0x00007f4f0dff8000)
From the '$ which -a curl' output I can see that my system is using the wrong version of curl for some reason. It's not using the linuxbrew installed version, but instead the one that loaded onto the cluster system. This seems pretty odd given that I've set my environment path up to call the linuxbrew version of curl.
curl -> ../.linuxbrew/Cellar/curl/7.55.1/bin/curl
curl-config -> ../.linuxbrew/Cellar/curl/7.55.1/bin/curl-config
I also have my .bash_profile set up so that the /bin directory within my home directory should be accessed before the cluster /bin directory.
export PATH=/users/home/jake/bin:/bin >>~/.bash_profile
But then again, I'm still learning command line so its quite likely I've still done something wrong. I've also tried to remove the LD_LIBRARY_PATH using the following:
export LD_LIBRARY_PATH=""
export -n LD_LIBRARY_PATH
Removing it doesn't seem to help, but I'm not totally convinced I've removed the LD_LIBRARY_PATH correctly as it gets reset when I reset/log back into the terminal. Had a look though my .bashrc, .bash_profile and .profile files and can't seem to locate where exactly the path variable is coming from.
$ which -a curl
~/bin/curl
/bin/curl
From the '$ which -a curl' output I can see that my system is using the wrong version of curl for some reason.
That output is actually fine. ~/bin/curl
is first in the list before /bin/curl
$ curl --version
Illegal instruction
Here's the problem. It's using a CPU opcode that's not supported by your system. I likely culprit is compiling openssl
on one system with a newer CPU, and then attempting to run it on an older system. If that's the case, try brew reinstall openssl
on the oldest system that you plan to use.
Try also…
env -u LD_LIBRARY_PATH curl --version
Hello again. So following your advice, here are the results:
$ brew reinstall openssl
==> Reinstalling openssl
/users/home/jake/opt/curl/bin/curl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
/users/home/jake/opt/curl/bin/curl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
==> Downloading https://www.openssl.org/source/openssl-1.0.2l.tar.gz
Already downloaded: /users/home/jake/.cache/Homebrew/openssl-1.0.2l.tar.gz
==> Downloading https://github.com/openssl/openssl/pull/1524.patch
Already downloaded: /users/home/jake/.cache/Homebrew/openssl--patch-bc954e98673a78983e58da2fe6decfcf94b38eeec78d8b456ca716a539f78b06.patch
==> Patching
==> Applying 1524.patch
patching file Configure
Hunk #1 succeeded at 1723 (offset 2 lines).
==> perl ./Configure --prefix=/users/home/jake/.linuxbrew/Cellar/openssl/1.0.2l --openssldir=/users/home/jake/etc/openssl no-s
==> make depend
==> make
==> make test
==> make install MANDIR=/users/home/jake/.linuxbrew/Cellar/openssl/1.0.2l/share/man MANSUFFIX=ssl
==> Downloading https://curl.haxx.se/ca/cacert-2017-01-18.pem
Already downloaded: /users/home/jake/.cache/Homebrew/openssl--cacert-2017-01-18.pem
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/users/home/jake/etc/openssl/certs
and run
/users/home/jake/opt/openssl/bin/c_rehash
==> Summary
🍺 /users/home/jake/.linuxbrew/Cellar/openssl/1.0.2l: 1,708 files, 14.4MB, built in 12 minutes 17 seconds
$ env -u LD_LIBRARY_PATH curl --version
curl 7.55.1 (x86_64-pc-linux-gnu) libcurl/7.55.1 OpenSSL/1.0.2l zlib/1.2.11
Release-Date: 2017-08-14
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy
So following the re-installation of openssl I tried to download the program muscle (example from my original post). The output was the following:
brew install muscle
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from d07cc2d61 to 09208fb2a.
Updated 2 taps (homebrew/core, homebrew/science).
==> New Formulae
docfx poppler@0.57
==> Updated Formulae
abcmidi fb-client lynis
ace fbida lzlib
activemq feh macvim
agedu ffe mbedtls
allure file-formula mdp
ansible-lint firebase-cli mgba
apache-opennlp fizmo mikutter
app-engine-java flow mutt
apr flowgrind mysql-sandbox
apr-util fluent-bit nestopia-ue
armadillo folly nnn
ats2-postiats fossil node@6
avfs freeciv nvm ✔
avro-c freetds opendetex
avro-cpp freexl paket
bacula-fd fs-uae pango
bashdb fuse-emulator pdf2htmlex
bcpp fuse-zip pdftoedn
bento4 fzf pdftoipe
bibutils gabedit pgformatter
bigloo galen ponyc
blockhash gammaray poppler
camlp5 gandi.cli postgrest
carthage gcsfuse povray
cassandra git-quick-stats pqiv
ccm gitbucket pre-commit
certbot glibmm psqlodbc
cheat gmime pulseaudio
checkbashisms gnome-builder pumba
chordii gnuplot qbs
cmark-gfm goocanvas qemu
conan goofys rtv
consul-backinator gource ruby
consul-template gtk+3 ruby@2.2 ✔
coreutils gtksourceview3 ruby@2.3
crash harfbuzz rustup-init
cython heroku sbt
dar homebrew/science/abinit sqlmap
deis homebrew/science/astrometry-net sslyze
diff-pdf homebrew/science/bowtie2 statik
diffoscope homebrew/science/cmdstan strongswan
digdag homebrew/science/gubbins swiftformat
django-completion homebrew/science/itensor syncthing
dmd homebrew/science/kent-tools sysbench
dmtx-utils homebrew/science/nextflow systemd
docker-compose homebrew/science/openimageio tee-clc
docker-compose-completion homebrew/science/spades telegraf
dsh hunspell termius
dtc hwloc terraform
dterm icoutils terragrunt
dub imagemagick tippecanoe
duck imagemagick@6 todoman
duo_unix io tokei
duplicity ios-deploy trafficserver
duply jenkins translate-toolkit
dvdauthor jupyter tth
dwarfutils kubernetes-helm urh
dwdiff libchamplain vala
easyrpg-player libmagic valabind
efl libmowgli vault
entr libspectrum vim
eprover libtiff vtk
etcd libu2f-host webpack
exact-image libuv wpscan
exempi libvirt yaz
eye-d3 libxml++ youtube-dl
faas-cli libxml2 ✔ zabbix
fabric libzip zbar
fatsort lldpd zimg
==> Deleted Formulae
abi-compliance-checker homebrew/science/statismo team-explorer-everywhere
==> Installing muscle from homebrew/science
==> Downloading https://linuxbrew.bintray.com/bottles-science/muscle-3.8.1551.x86_64_linux.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/c5/c554628301f042c9803c045da94ea9109c414b277f994cd6fc07763c93c7e510?__gda__=ex
######################################################################## 100.0%
==> Pouring muscle-3.8.1551.x86_64_linux.bottle.tar.gz
🍺 /users/home/jake/.linuxbrew/Cellar/muscle/3.8.1551: 3 files, 605.5KB
As a precaution I decided to install a couple of other programs, all of which downloaded, installed and function as expected. So from what I can tell brew is back to working perfectly - issue resolved.
Thankyou for all your help and prompt replies, much appreciated. And once again thanks for creating such a great program.
Happy to help. Glad to hear that you got it working!
Please always follow these steps:
brew
command and notbrew install
ing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at https://github.com/Linuxbrew/homebrew-core/issues/newbrew update
and retried your prior step?brew doctor
, fixed all issues and retried your prior step?brew config
andbrew doctor
and included their output with your issue?Please note we will close your issue without comment if you delete or do not fill out the issue checklist and provide ALL the requested information.
Hi Linuxbrew help,
I'm hoping you can help me with an issue that has seemingly popped up out of no where. I've been using linuxbrew regularly over the last few months and am really happy with the program overall (seriously its great). But in the last week I seem to have lost all capacity to install new programs or upgrade existing ones. The issue appears to be related to brew's ability to install packages from websites. For example:
This issue is not specific to muscle but all new programs and/or existing program updates. Brew will always try to download a program from bottle, fail, then move to downloading the program from source, which also fails. I was concerned that this issue was stemming from curl/openssl so followed the recommendations given on https://github.com/Linuxbrew/legacy-linuxbrew/issues/883. This allowed me to update curl/openssl yet the issue persists.
I suspect something has gone wrong with brews ability to interact with outside programs/resources. This seems to also extend to brews ability to update itself.
The programs that are currently installed using linuxbrew are still functional. However, they cannot be upgraded as the upgrades seemingly cannot be downloaded from bottles or source. I have included my brew config and doctor outputs below. However please take note of the comment related to the brew doctor output.
Doctor Comment: I'm working within a high performance cluster system and thus I do not have root access to /bin/.. I can remove the /bin/ directory from my environment path, however I will then lose basic command functions (such as vi, ls, etc). For this reason I have not removed them yet (although I can). I can also remove the LD_LIBRARY_PATH however this does not seem to have any impact on whether brew is able to install/upgrade programs. I have thus left it here in case it does have some unforeseen relevance, however again I can remove it from my path if required.