New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby zlib extension was not compiled OS X 10.9.5 #832
Comments
omg, totally listed this in the wrong github page. too many tabs open trying to fix this. sorry! |
You totally listed this in the right GitHub repo 😉 The ruby-build project is responsible for That's a very interesting error. Rubies were known to compile without problems using OS X system libzlib. For you, it failed for some reason. Have you installed a custom zlib somehow? |
that's a great question. i've done numerous things to the computer in question over the years so maybe. how would i know where to look? |
I'm not sure how to look :( You could always try to install zlib with Homebrew and use |
Other things to try: ls /usr/lib/libz*
# should produce:
# /usr/lib/libz.1.1.3.dylib
# /usr/lib/libz.1.2.5.dylib
# /usr/lib/libz.1.dylib
# /usr/lib/libz.dylib
# if all else fails, resort to Homebrew:
brew install zlib
LDFLAGS=-L/usr/local/opt/zlib/lib CPPFLAGS=-I/usr/local/opt/zlib/include rbenv install 2.2.4 |
I had the same issue and the following worked.
|
Thanks for sharing that it worked for you, @renatomoya. Could you also share your output of The reason I'm confused about this is that Ruby should compile well against system version of zlib on OS X. The Homebrew step shouldn't be necessary, but for some people it mysteriously is. |
thanks for not giving up on this, i practically had :) I tried punching in the things that were suggested here, but i still have the same zlib errors Here's my output when i run
quick question, when you said "You could always try to install zlib with Homebrew and use RUBY_CONFIGURE_OPTS=--with-zlib-dir="$(brew --prefix zlib)""...tell me more about that RUBY_CONFIGURE_OPTS part. do i just punch that line into terminal and hit enter? or am I supposed to tack that on the |
You would literally do these commands in the terminal: brew install zlib
RUBY_CONFIGURE_OPTS="--with-zlib-dir=$(brew --prefix zlib)" rbenv install 2.2.3 Everyone: When someone experiences a zlib failure on OS X without using Homebrew zlib next, could you please paste the full build log (stored in a file as indicated) as a gist and paste the link here? Thanks. |
oh ok. i figured the RUBY_CONFIGURE_OPTS line and the rbenv line were separate and meant to be entered seperately. i pasted the entire line and it works! Thanks so much! |
@mislav This is lrwxr-xr-x 1 root wheel 12 Jun 30 2015 /usr/lib/libz.1.1.3.dylib -> libz.1.dylib
lrwxr-xr-x 1 root wheel 12 Jun 30 2015 /usr/lib/libz.1.2.5.dylib -> libz.1.dylib
-rwxr-xr-x 1 root wheel 169312 Sep 9 2014 /usr/lib/libz.1.dylib
lrwxr-xr-x 1 root wheel 12 Jun 30 2015 /usr/lib/libz.dylib -> libz.1.dylib |
@renatomoya That looks alright; thanks for sharing. It's really weird that Ruby has trouble linking to zlib for only specific people. Next time this happens to anyone, please share the full build log as a gist so that I can inspect any zlib-related output. Thanks! |
Hi, I just ran into this trying to install
Here's the full log without zlib installed via Homebrew.
EDIT Here's the mkmf.log from the ext/zlib directory. No idea what's going on here. If I run
|
@ledbettj Thanks for sharing! Does the error go away if you remove |
@mislav Yup, I just tried that (unsure what dropped it there -- it wasn't homebrew) and yes, the install completed fine with no errors. Unsure if this is related to the original issue here though. Thanks for the help! |
@ledbettj Thanks for checking! It's quite possible that other people reporting this issue might have had something in their |
@mislav Just wanted to confirm the working theory. I'm running OSX 10.10.5 and while attempting to |
Had the same issue on OSX 10.10.5, found stuff with |
The same worked for me as well installing 2.3.1. In case it's helpful, here is the full log of the original failure |
i was having the same issue. I had files in /usr/local/lib/libz* and /usr/lib/libz*. I moved the files from /usr/local/lib/ and it worked. Thanks /usr/local/lib/libz* /usr/lib/libz* |
macOS 10.9 is EOL status by Apple. We can't investigate this continuously in 2017. |
I had the issue on 10.10.5, just sayin. I think people who come across this can just follow the same steps to remove the libz stuff and carry on with their lives |
Had the same issue in 10.12.3. Removing the libz* files under usr/local/lib/ fixed it for me. |
Had this problem in 10.12.6 I removed the libz* files under |
trying to get ruby 2.2.3 running on this computer. curiously, i was able to do this just fine on a different computer earlier today (probably running 10.8 or 10.9). also tried 2.2.2, same result.
I'm guessing there's just something trivial I need to do, but I'm a little dicey on this kind of stuff.
Here's the log when I run rbenv install 2.2.3
The text was updated successfully, but these errors were encountered: