Skip to content
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

Could not open library 'libutil.so' #4672

Closed
shannah opened this issue Jun 14, 2017 · 2 comments
Closed

Could not open library 'libutil.so' #4672

shannah opened this issue Jun 14, 2017 · 2 comments

Comments

@shannah
Copy link

shannah commented Jun 14, 2017

Environment

$ ./bin/jruby -v
jruby 9.1.10.0 (2.3.3) 2017-05-25 b09c48a Java HotSpot(TM) 64-Bit Server VM 25.102-b14 on 1.8.0_102-b14 +jit [linux-x86_64]
$ cat /etc/*release
CentOS Linux release 7.2.1511 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.2.1511 (Core) 
CentOS Linux release 7.2.1511 (Core) 

$ uname -a
Linux li1287-217.members.linode.com 4.8.6-x86_64-linode78 #1 SMP Tue Nov 1 14:51:21 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

$ yum list installed | grep glibc
glibc.x86_64                        2.17-157.el7_3.2                   @updates 
glibc-common.x86_64                 2.17-157.el7_3.2                   @updates 

This is a fresh jruby installation with only one gem installed (and dependencies added by installing it): fastlane

Expected Behavior

Open irb, and try to require 'fastlane'. It should load ok.

$ ./bin/jruby -S irb
irb(main):001:0> require 'fastlane'
/path/to/jruby-9.1.10.0/lib/ruby/gems/shared/gems/commander-fastlane-4.4.4/lib/commander/user_interaction.rb:334: warning: constant ::JavaPackageModuleTemplate is deprecated
=> true

Actual Behavior

Open irb, and try to require 'fastlane'. I get a load error as follows:

[codenameone@li1287-217 jruby-9.1.10.0]$ ./bin/jruby -S irb
irb(main):001:0> require 'fastlane'
LoadError: Could not open library 'libutil' : libutil: cannot open shared object file: No such file or directory. Could not open library 'libutil.so' : libutil.so: cannot open shared object file: No such file or directory
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/ffi/library.rb:114:in `block in ffi_lib'
	from org/jruby/RubyArray.java:2486:in `map'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/ffi/library.rb:84:in `ffi_lib'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/pty.rb:10:in `<module:LibUtil>'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/pty.rb:5:in `<module:PTY>'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/pty.rb:4:in `<main>'
	from org/jruby/RubyKernel.java:961:in `require'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /path/to/jruby-9.1.10.0/lib/ruby/gems/shared/gems/fastlane-2.38.1/fastlane_core/lib/fastlane_core/itunes_transporter.rb:1:in `<main>'
	from org/jruby/RubyKernel.java:961:in `require'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /path/to/jruby-9.1.10.0/lib/ruby/gems/shared/gems/fastlane-2.38.1/fastlane_core/lib/fastlane_core/itunes_transporter.rb:1:in `<main>'
	from org/jruby/RubyKernel.java:961:in `require'
	from /path/to/jruby-9.1.10.0/lib/ruby/gems/shared/gems/fastlane-2.38.1/fastlane_core/lib/fastlane_core.rb:1:in `(root)'
	from /path/to/jruby-9.1.10.0/lib/ruby/gems/shared/gems/fastlane-2.38.1/fastlane_core/lib/fastlane_core.rb:19:in `<main>'
	from org/jruby/RubyKernel.java:961:in `require'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `(root)'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:65:in `<eval>'
	from org/jruby/RubyKernel.java:1000:in `eval'
	from /path/to/jruby-9.1.10.0/lib/ruby/gems/shared/gems/fastlane-2.38.1/fastlane/lib/fastlane.rb:1:in `(root)'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `(root)'
	from /path/to/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:130:in `block in require'
	from (irb):1:in `evaluate'
	from org/jruby/RubyKernel.java:1298:in `loop'
	from org/jruby/RubyKernel.java:1120:in `catch'
	from org/jruby/RubyKernel.java:1120:in `catch'
	from /path/to/jruby-9.1.10.0/bin/jirb:13:in `<main>'

Workaround

This issue was resolved by creating a symlink from the libutil-2.17.so to libutil.so:

$ ln -s /usr/lib64/libutil-2.17.so /usr/lib64/libutil.so

Prior to making that symlink, the lib64 directory contained:

$ ls -la /usr/lib64 | grep libutil
-rwxr-xr-x   1 root root   14872 May 25 16:12 libutil-2.17.so
lrwxrwxrwx   1 root root      15 Jun 14 20:53 libutil.so.1 -> libutil-2.17.so
@kares
Copy link
Member

kares commented Sep 25, 2018

checked that this works fine in latest release (9.2), however using Ubuntu.
the missing symlink I believe must be an issue with the Linux distribution (CentOS 7.2 in this case).
hopefully, fixed since.

@kares kares closed this as completed Sep 25, 2018
@kares kares added this to the Invalid or Duplicate milestone Sep 25, 2018
@headius
Copy link
Member

headius commented Sep 27, 2022

Funny thing, I'm running into this on a current version of Fedora, so it doesn't seem to be fixed there.

byteit101 added a commit to byteit101/subspawn that referenced this issue Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants