rbenv: Ruby 2.1.1 build fails on OS X (LDFLAGS error)

I’m having Ruby 2.1.1 build failures on rbenv 0.4.0-97-gfe0b243 with OS X 10.9.3. Excerpt:

checking whether LDFLAGS is valid... no
configure: error: something wrong with
LDFLAGS="-L/Users/erik/.rbenv/versions/2.1.1/lib "
make: *** No targets specified and no makefile found.  Stop.

Shell output in this Gist or:

Downloading ruby-2.1.1.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
Installing ruby-2.1.1...

BUILD FAILED

Inspect or clean up the working tree at
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171
Results logged to
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171.log

Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with
LDFLAGS="-L/Users/erik/.rbenv/versions/2.1.1/lib "

BUILD FAILED

Inspect or clean up the working tree at
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171
Results logged to
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171.log

Last 10 log lines:
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with
LDFLAGS="-L/Users/erik/.rbenv/versions/2.1.1/lib "
make: *** No targets specified and no makefile found.  Stop.

Log output in this Gist.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 24 (6 by maintainers)

Most upvoted comments

TL;DR for people needing a quick fix:

LIBRARY_PATH="" rvm install X.X.X

Try to create directory pointed by LDFLAGS, in example:

mkdir -p /Users/stone/.rbenv/versions/2.1.1/lib

For me - it worked!

Mine wasn’t working because there was no /usr/local/lib directory (none of my brew formulae needed it). Creating it and re-running the install fixed the issue for me.

Can confirm. Whatever directory LDFLAGS referenced inside it, didn’t exist. Creating it allowed for install to run fine.