Skip to content

Debian 9 / 10: Could not open library 'opencc': opencc: cannot open shared object file: No such file or directory #13

@msg7086

Description

@msg7086

Steps to reproduce

On Debian 9 (Stretch) or 10 (Buster):

apt install libopencc2
gem install ropencc

Expected

require 'ropencc' should work.

Actual

LoadError: Could not open library 'opencc': opencc: cannot open shared object file: No such file or directory.
Could not open library 'libopencc.so': libopencc.so: cannot open shared object file: No such file or directory
/var/lib/gems/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:145:in `block in ffi_lib'
/var/lib/gems/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:99:in `map'
/var/lib/gems/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:99:in `ffi_lib'
/var/lib/gems/2.5.0/gems/ropencc-0.0.6/lib/ropencc.rb:8:in `<module:LibOpenCC>'
/var/lib/gems/2.5.0/gems/ropencc-0.0.6/lib/ropencc.rb:6:in `<class:Ropencc>'
/var/lib/gems/2.5.0/gems/ropencc-0.0.6/lib/ropencc.rb:5:in `<top (required)>'

Workaround

ln -s /usr/lib/x86_64-linux-gnu/{libopencc.so.2,libopencc.so}

This issue is just FYI for future reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions