Skip to content

Unable to install websocket-driver 0.7.5 on Amazon EC2 linux #84

@briri

Description

@briri

I just ran bundle update for my project and all went well and am able to run my Rails 5.2.x app on my OSX dev machine. When I try to run bundle install however on my linux server it fails to install the 0.7.5 gem.

I was able to lock it to version 0.7.4 in my Gemfile for now.

My OS info:

-bash-4.2$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

Bundler output:

Fetching gem metadata from https://rubygems.org/.......
Using rake 13.0.3
Using concurrent-ruby 1.1.9
Using i18n 1.8.10
Using minitest 5.14.4
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 5.2.6
Using builder 3.2.4
Using erubi 1.10.0
Using mini_portile2 2.5.3
Using racc 1.5.2
Using nokogiri 1.11.7 (x86_64-linux)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.10.0
Using rails-html-sanitizer 1.3.0
Using actionview 5.2.6
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 5.2.6
Using nio4r 2.5.7
Using websocket-extensions 0.1.5
Fetching websocket-driver 0.7.5
Installing websocket-driver 0.7.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /my/app/ruby/2.6.0/gems/websocket-driver-0.7.5/ext/websocket-driver
/usr/bin/ruby -I /usr/share/rubygems -r ./siteconf20210615-16710-125xzhr.rb extconf.rb
creating Makefile

current directory: /my/app/ruby/2.6.0/gems/websocket-driver-0.7.5/ext/websocket-driver
make "DESTDIR=" clean
rm -f 
rm -f websocket_mask.so  *.o  *.bak mkmf.log .*.time

current directory: /my/app/ruby/2.6.0/gems/websocket-driver-0.7.5/ext/websocket-driver
make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I.   -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches  -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -fPIC -m64 -o websocket_mask.o -c websocket_mask.c
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
make: *** [websocket_mask.o] Error 1

make failed, exit code 2

Gem files will remain installed in /my/app/ruby/2.6.0/gems/websocket-driver-0.7.5 for inspection.
Results logged to /my/app/ruby/2.6.0/extensions/x86_64-linux/2.6.0/websocket-driver-0.7.5/gem_make.out

An error occurred while installing websocket-driver (0.7.5), and Bundler cannot continue.
Make sure that `gem install websocket-driver -v '0.7.5' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  contact_us was resolved to 1.2.0, which depends on
    rails was resolved to 5.2.6, which depends on
      actioncable was resolved to 5.2.6, which depends on
        websocket-driver

Gemfile.lock (just displaying the pertinent bits):

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.2.6)
      actionpack (= 5.2.6)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)

      ...

   websocket-driver (0.7.4)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)

    ..

RUBY VERSION
   ruby 2.6.3p62

BUNDLED WITH
   2.1.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions