Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Could not open library 'lib.so': lib.so: cannot open shared object file: No such file or directory #17

Open
halostatue opened this issue Jun 21, 2017 · 6 comments

Comments

@halostatue
Copy link
Collaborator

halostatue commented Jun 21, 2017

Trying to run Jekyll, I get this error:

/usr/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/lib/ffi/library.rb:121:in `block in ffi_lib': Could not open library 'lib.so': lib.so: cannot open shared object file: No such file or directory (LoadError)
	from /usr/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/lib/ffi/library.rb:88:in `map'
	from /usr/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/lib/ffi/library.rb:88:in `ffi_lib'
	from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython/python.rb:29:in `<module:Python>'
	from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython/python.rb:21:in `<top (required)>'
	from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython.rb:261:in `load'
	from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython.rb:261:in `reload_library'
	from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython.rb:104:in `start'
	from /usr/lib/ruby/gems/1.9.1/gems/pygments.rb-0.2.12/lib/pygments/ffi.rb:8:in `start'
	from /usr/lib/ruby/gems/1.9.1/gems/pygments.rb-0.2.12/lib/pygments/ffi.rb:82:in `highlight'
	from /home/user/octopress/plugins/pygments_code.rb:24:in `pygments'
	from /home/user/octopress/plugins/pygments_code.rb:14:in `highlight'
	from /home/user/octopress/plugins/backtick_code_block.rb:37:in `block in render_code_block'
	from /home/user/octopress/plugins/backtick_code_block.rb:13:in `gsub'
	from /home/user/octopress/plugins/backtick_code_block.rb:13:in `render_code_block'
	from /home/user/octopress/plugins/octopress_filters.rb:12:in `pre_filter'
	from /home/user/octopress/plugins/octopress_filters.rb:28:in `pre_render'
	from /home/user/octopress/plugins/post_filters.rb:112:in `block in pre_render'
	from /home/user/octopress/plugins/post_filters.rb:111:in `each'
	from /home/user/octopress/plugins/post_filters.rb:111:in `pre_render'
	from /home/user/octopress/plugins/post_filters.rb:166:in `do_layout'
	from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/post.rb:189:in `render'
	from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:193:in `block in render'
	from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:192:in `each'
	from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:192:in `render'
	from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:40:in `process'
	from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>'
	from /usr/bin/jekyll:19:in `load'
	from /usr/bin/jekyll:19:in `<main>'
@halostatue
Copy link
Collaborator Author

I am having the same issue on ArchLinux. It appears to be a problem in the initialize function in the PythonExec class. On systems where the Python executable (reported by sys.executable) is something like /usr/bin/python2.7, the test:
if (@realname !~ /#{@Version}$/ and @realname !~ /.exe$/)
fails, meaning that the Python version (excluding the separating period) is appended to the name of the executable. This leads to the @basename field having the erroneous value python2.727 on my system.

@halostatue
Copy link
Collaborator Author

Does this bug still occur in version 0.6.2?

@halostatue
Copy link
Collaborator Author

(Reply via aati...@gmail.com):
I was getting that error trying to use another ruby based script. Since, I don't use it now, I am unaware of this.

@halostatue
Copy link
Collaborator Author

Gentoo 64bit also having this error with Jekyll/octopress. I tried to locate lib.so it doesn't find it. Using Python 2.7 in my eselect slot

@halostatue
Copy link
Collaborator Author

To run jekyll successfully, I did this. If all you need is to do run jekyll then use this diff (patch file pythonexec.rb in gems/rubypython-0.5.3/lib/rubypython).

--- pythonexec.rb.old   2012-08-08 18:10:53.158118388 +0530
+++ pythonexec.rb       2012-08-08 18:10:56.296118290 +0530
@@ -23,7 +23,7 @@
       @realname = "#{@python}#{@version}"
     else
       basename = File.basename(@python, '.exe')
-      @realname = File.join(@dirname, "#{basename}#{@version.gsub(/\./, '')}")
+      @realname = "/usr/bin/python2.7" #File.join(@dirname, "#{basename}#{@version.gsub(/\./, '')}")
     end
     @basename = File.basename(@realname)

Sadly, I don't know Ruby to fix the line which is causing the bug, so I applied this static fix.

@halostatue
Copy link
Collaborator Author

Loading python has been changed since 0.6. Does this still apply?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant