library not found for class Digest::SHA1 -- digest/sha1 (LoadError)
denizdogan opened this issue · 3 comments
denizdogan commented
For some reason, I keep getting the error "library not found for class Digest::SHA1 -- digest/sha1 (LoadError)" whenever I try to run dexter after installing it with apt-get. When I install it using gem install pgdexter
, it works fine. I'm guessing this has something to do with some missing system dependency?
OS information:
root@6bfce4af59aa:/tmp# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch
Output:
root@6bfce4af59aa:/tmp# dexter --version
Traceback (most recent call last):
27: from /opt/dexter/bin/dexter:15:in `<main>'
26: from /opt/dexter/vendor/ruby-2.5.7/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
25: from /opt/dexter/vendor/ruby-2.5.7/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
24: from /opt/dexter/vendor/ruby-2.5.7/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
23: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/setup.rb:10:in `<top (required)>'
22: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:101:in `setup'
21: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:135:in `definition'
20: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:34:in `build'
19: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/dsl.rb:13:in `evaluate'
18: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/dsl.rb:234:in `to_definition'
17: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/dsl.rb:234:in `new'
16: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:120:in `initialize'
15: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:674:in `converge_sources'
14: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source_list.rb:104:in `replace_sources!'
13: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source_list.rb:85:in `lock_sources'
12: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source_list.rb:85:in `sort_by'
11: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source_list.rb:85:in `each'
10: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/git.rb:76:in `to_s'
9: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/git.rb:225:in `revision'
8: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/git.rb:299:in `git_proxy'
7: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/git.rb:216:in `cache_path'
6: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/git.rb:321:in `git_scope'
5: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/git.rb:287:in `uri_hash'
4: from /opt/dexter/vendor/bundle/ruby/2.5.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:225:in `digest'
3: from /opt/dexter/vendor/ruby-2.5.7/lib/ruby/2.5.0/digest.rb:98:in `Digest'
2: from /opt/dexter/vendor/ruby-2.5.7/lib/ruby/2.5.0/digest.rb:98:in `synchronize'
1: from /opt/dexter/vendor/ruby-2.5.7/lib/ruby/2.5.0/digest.rb:100:in `block in Digest'
/opt/dexter/vendor/ruby-2.5.7/lib/ruby/2.5.0/digest.rb:16:in `const_missing': library not found for class Digest::SHA1 -- digest/sha1 (LoadError)
Dockerfile:
FROM postgres:9.6
WORKDIR /tmp
# install build requirements
RUN apt-get update && \
apt-get -y install make gcc postgresql-server-dev-9.6 lsb-release apt-transport-https wget unzip
# install hypopg
ENV HYPOPG_VERSION 1.1.4
RUN wget -q https://github.com/HypoPG/hypopg/archive/$HYPOPG_VERSION.zip && \
unzip -qq $HYPOPG_VERSION.zip && \
cd hypopg-$HYPOPG_VERSION && \
make && \
make install
# install dexter
# https://github.com/ankane/dexter/blob/master/guides/Linux.md#debian
RUN wget -qO- https://dl.packager.io/srv/pghero/dexter/key | apt-key add -
RUN wget -O /etc/apt/sources.list.d/dexter.list \
https://dl.packager.io/srv/pghero/dexter/master/installer/debian/$(. /etc/os-release && echo $VERSION_ID).repo
RUN apt-get update
RUN apt-get -y install dexter
# install useful tools
RUN apt-get -y install man less vim-tiny
ankane commented
Hey @denizdogan, thanks for reporting. It looks like libssl is required. I'll either remove that dependency or specify it in the package. For now, on Debian Stretch, you can do:
apt-get install libssl1.0.2
denizdogan commented
Thanks @ankane that does the trick!
ankane commented
Added the dependency in 0.3.9 (building now). Thanks again for reporting!