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

psapi: cannot open shared object file: No such file or directory (Fiddle::DLError) #166

Open
K4mey opened this issue Jun 14, 2020 · 3 comments

Comments

@K4mey
Copy link

K4mey commented Jun 14, 2020

viktor@localhost:~/Desktop> ocra RubyShot.rb

/usr/lib64/ruby/gems/2.7.0/gems/ocra-1.3.11/bin/ocra:20: warning: already initialized constant File::ALT_SEPARATOR
=== Loading script to check dependencies
Please provide the webpage url:
https://www.google.com

Please type image format etc png, jpg..
png

Please type the filename you want your screenshot to be saved as?
google

screenshot saved :D!=== Detected gem did_you_mean-1.4.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem ocra-1.3.11 (loaded, files)
=== 5 files, 271800 bytes
=== Detected gem uri-0.10.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem phantomjs-2.1.1.0 (loaded, files)
=== 9 files, 7819 bytes
=== Detected gem mini_magick-4.10.1 (loaded, files)
=== 22 files, 46173 bytes
=== Detected gem gastly-1.0.1 (loaded, files)
=== 20 files, 47509 bytes
=== Detected gem fileutils-1.4.1 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem delegate-0.1.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem etc-1.1.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem logger-1.4.2 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem timeout-0.1.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem benchmark-0.1.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem stringio-0.1.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem date-3.0.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem json-2.3.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem ostruct-0.2.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem open3-0.1.0 (loaded, files)
=== 0 files, 0 bytes
=== Including 61 encoding support files (3577440 bytes, use --no-enc to exclude)
Traceback (most recent call last):
6: from /usr/lib64/ruby/gems/2.7.0/gems/ocra-1.3.11/bin/ocra:1231:in block in <top (required)>' 5: from /usr/lib64/ruby/gems/2.7.0/gems/ocra-1.3.11/bin/ocra:862:in build_exe'
4: from /usr/lib64/ruby/gems/2.7.0/gems/ocra-1.3.11/bin/ocra:1027:in detect_dlls' 3: from /usr/lib64/ruby/gems/2.7.0/gems/ocra-1.3.11/bin/ocra:1000:in loaded_dlls'
2: from /usr/lib64/ruby/gems/2.7.0/gems/fiddle-1.0.0/lib/fiddle.rb:47:in dlopen' 1: from /usr/lib64/ruby/gems/2.7.0/gems/fiddle-1.0.0/lib/fiddle.rb:47:in new'
/usr/lib64/ruby/gems/2.7.0/gems/fiddle-1.0.0/lib/fiddle.rb:47:in `initialize': psapi: cannot open shared object file: No such file or directory (Fiddle::DLError)
viktor@localhost:~/Desktop>

How do i fix this error?

@khongcodes
Copy link

+1 also getting practically the same output:

=== Detected gem did_you_mean-1.3.1 (loaded, files)
===     18 files, 17383 bytes
=== Detected gem executable-hooks-1.6.0 (loaded, files)
===     11 files, 6376 bytes
=== Detected gem bundler-unload-1.0.2 (loaded, files)
===     4 files, 1683 bytes
=== Detected gem rubygems-bundler-1.4.5 (loaded, files)
===     7 files, 6035 bytes
=== Detected gem bundler-2.1.4 (loaded, files)
===     206 files, 989324 bytes
=== Detected gem ocra-1.3.11 (loaded, files)
===     5 files, 271800 bytes
=== Detected gem mini_portile2-2.4.0 (loaded, files)
===     9 files, 8337 bytes
=== Detected gem nokogiri-1.10.9 (loaded, files)
===     72 files, 4842634 bytes
=== Detected gem stringio-0.1.0 (loaded, files)
===     2 files, 49464 bytes
=== Detected gem strscan-1.0.3 (loaded, files)
===     3 files, 71000 bytes
=== Detected gem date-3.0.1 (loaded, files)
===     4 files, 823244 bytes
=== Detected gem colorize-0.8.1 (loaded, files)
===     4 files, 7572 bytes
=== Detected gem byebug-11.1.3 (loaded, files)
===     9 files, 119440 bytes
=== Including 0 encoding support files (0 bytes, use --no-enc to exclude)
Traceback (most recent call last):
        6: from /Users/khong/.rvm/gems/ruby-2.6.1/gems/ocra-1.3.11/bin/ocra:1231:in `block in <top (required)>'
        5: from /Users/khong/.rvm/gems/ruby-2.6.1/gems/ocra-1.3.11/bin/ocra:862:in `build_exe'
        4: from /Users/khong/.rvm/gems/ruby-2.6.1/gems/ocra-1.3.11/bin/ocra:1027:in `detect_dlls'
        3: from /Users/khong/.rvm/gems/ruby-2.6.1/gems/ocra-1.3.11/bin/ocra:1000:in `loaded_dlls'
        2: from /Users/khong/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/fiddle.rb:47:in `dlopen'
        1: from /Users/khong/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/fiddle.rb:47:in `new'
/Users/khong/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/fiddle.rb:47:in `initialize': dlopen(psapi, 9): image not found (Fiddle::DLError)

@silva96
Copy link

silva96 commented Dec 1, 2020

same

/Users/benja/.rvm/gems/ruby-2.6.5/gems/ocra-1.3.11/bin/ocra:20: warning: already initialized constant File::ALT_SEPARATOR
=== Loading script to check dependencies

=== Detected gem did_you_mean-1.3.0 (loaded, files)
===     19 files, 20261 bytes
=== Detected gem ocra-1.3.11 (loaded, files)
===     5 files, 271800 bytes
=== Detected gem zlib-1.0.0 (loaded, files)
=== WARNING: Gem zlib-1.0.0 root folder was not found, skipping
=== Detected gem stringio-0.0.2 (loaded, files)
=== WARNING: Gem stringio-0.0.2 root folder was not found, skipping
=== Detected gem json-2.3.0 (loaded, files)
===     34 files, 380670 bytes
=== Detected gem ostruct-0.1.0 (loaded, files)
=== WARNING: Gem ostruct-0.1.0 root folder was not found, skipping
=== Detected gem ipaddr-1.2.2 (loaded, files)
=== WARNING: Gem ipaddr-1.2.2 root folder was not found, skipping
=== Detected gem openssl-2.1.2 (loaded, files)
=== WARNING: Gem openssl-2.1.2 root folder was not found, skipping
=== Including 0 encoding support files (0 bytes, use --no-enc to exclude)
Traceback (most recent call last):
        6: from /Users/benja/.rvm/gems/ruby-2.6.5/gems/ocra-1.3.11/bin/ocra:1231:in `block in <top (required)>'
        5: from /Users/benja/.rvm/gems/ruby-2.6.5/gems/ocra-1.3.11/bin/ocra:862:in `build_exe'
        4: from /Users/benja/.rvm/gems/ruby-2.6.5/gems/ocra-1.3.11/bin/ocra:1027:in `detect_dlls'
        3: from /Users/benja/.rvm/gems/ruby-2.6.5/gems/ocra-1.3.11/bin/ocra:1000:in `loaded_dlls'
        2: from /Users/benja/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/fiddle.rb:47:in `dlopen'
        1: from /Users/benja/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/fiddle.rb:47:in `new'
/Users/benja/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/fiddle.rb:47:in `initialize': dlopen(psapi, 9): image not found (Fiddle::DLError)

@Gagem-wut
Copy link

Gagem-wut commented Jul 18, 2021

if your project is just a simple project and nothing that needs to be perfect then just run it with --no-autodll like so:
sudo ocra foo.rb --no-autodll --output foo.exe

edit: i know this issue is old, however some people are still having it and this is the first one that pops up when searching about it. so i figured i would just leave this here so people can see it in the future :)

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

4 participants