[Resolved] Install hiredis failed arm directory or files not found

Hello,

I’m trying an installation of Mastodon instance on tinkerboard running with Armbian OS.

I follow this topic : documentation/Production-guide.md at master · tootsuite/documentation · GitHub

the last command i ran was :

bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test     

it returned me :

Fetching: hiredis-0.6.1.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing hiredis:
    ERROR: Failed to build gem native extension.

current directory: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/hiredis-0.6.1/ext /hiredis_ext
/home/mastodon/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180315-22972-ynlyve.rb extconf.rb
checking for sys/socket.h... yes
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb arm net.c
cc: error: arm: Aucun fichier ou dossier de ce type
Makefile:136 : la recette pour la cible « net.o » a échouée
make: *** [net.o] Erreur 1
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/mastodon/.rbenv/versions/2.5.0/bin/$(RUBY_BASE_NAME)
extconf.rb:33:in `block in <main>': Building hiredis failed (RuntimeError)
    from extconf.rb:31:in `chdir'
    from extconf.rb:31:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

 /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/extensions/armv7l-linux/2.5.0-static/hiredis-0.6.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/hiredis-0.6.1 for inspection.
Results logged to /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/extensions/armv7l-linux/2.5.0-static/hiredis-0.6.1/gem_make.out    

The problem seems to be that arm files or directory doesn’t exist but i didn’t find any solutions.

Anybody get an idea ?

Thanks a lot and i’apologize to my English expression.

This is a problem the compiler flags on your platform. What does gem environment say?

gem environnement

return me

the "gem" programm is not installed. You can installed it with : sudo apt install ruby

Did i forget a step in the topic ?

So how did the previous command from the guide

 gem install bundle

work?

gem install bundler

returned me

"gem" is not installed. You can install it with "sudo apt install ruby"

it’s strange because i don’t remember any kind of message like this.

Perhaps i didn’t understand this sentence ? :

Now that rbenv and ruby-build are installed, we will install the Ruby version which Mastodon uses. That version will also need to be enabled.

I understood ‘Ruby’ will install later, because the word ‘will’ was use, and i followed command instruction. You think is a misunderstanding and i need to install it right now ?

I install Ruby and did :

 bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test    

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/hiredis-0.6.1/ext/hiredis_ext
/home/mastodon/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180320-16819-1t3zgq5.rb extconf.rb
checking for sys/socket.h... yes
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb arm net.c
cc: error: arm: Aucun fichier ou dossier de ce type
Makefile:136 : la recette pour la cible « net.o » a échouée
make: *** [net.o] Erreur 1
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/home/mastodon/.rbenv/versions/2.5.0/bin/$(RUBY_BASE_NAME)
extconf.rb:33:in `block in <main>': Building hiredis failed (RuntimeError)
	from extconf.rb:31:in `chdir'
	from extconf.rb:31:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/home/mastodon/live/vendor/bundle/ruby/2.5.0/extensions/armv7l-linux/2.5.0-static/hiredis-0.6.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/hiredis-0.6.1
for inspection.
Results logged to
/home/mastodon/live/vendor/bundle/ruby/2.5.0/extensions/armv7l-linux/2.5.0-static/hiredis-0.6.1/gem_make.out

An error occurred while installing hiredis (0.6.1), and Bundler cannot continue.
Make sure that `gem install hiredis -v '0.6.1'` succeeds before bundling.

In Gemfile:
  hiredis

Then i did :

gem environment

it returned me :

 While executing gem ... (Gem::CommandLineError)
Unknown command environnement


gem install bundle  

returned me :

Fetching: bundle-0.0.1.gem (100%)
Successfully installed bundle-0.0.1
Parsing documentation for bundle-0.0.1
Installing ri documentation for bundle-0.0.1
Done installing documentation for bundle after 0 seconds
1 gem installed

with the correct command line

gem environment

returned me

RubyGems Environment:
  - RUBYGEMS VERSION: 2.7.3
  - RUBY VERSION: 2.5.0 (2017-12-25 patchlevel 0) [armv7l-linux-eabihf]
  - INSTALLATION DIRECTORY: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0
  - USER INSTALLATION DIRECTORY: /home/mastodon/.gem/ruby/2.5.0
  - RUBY EXECUTABLE: /home/mastodon/.rbenv/versions/2.5.0/bin/ruby
  - EXECUTABLE DIRECTORY: /home/mastodon/.rbenv/versions/2.5.0/bin
  - SPEC CACHE DIRECTORY: /home/mastodon/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /home/mastodon/.rbenv/versions/2.5.0/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - armv7l-linux
  - GEM PATHS:
     - /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0
     - /home/mastodon/.gem/ruby/2.5.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/mastodon/.rbenv/versions/2.5.0/bin
     - /home/mastodon/.rbenv/libexec
     - /home/mastodon/.rbenv/plugins/ruby-build/bin
     - /home/mastodon/bin
     - /home/mastodon/.local/bin
     - /home/mastodon/.rbenv/shims
     - /home/mastodon/.rbenv/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/local/games
     - /usr/games

Hello !

I finally found solution to install redis tools.

First of all to install Mastodon on arm architecture is better to use docker. But to install docker this way https://docs.docker.com/install/linux/docker-ce/ubuntu/ wasn’t work to me.

So i did :

sudo apt install docker.io

To install docker-compose some advices say to use pip on this way but didn’t work well.

So i used :

sudo apt install docker-compose

/!\ This step compromise your security system if you run your site in production /!\ :
After that I run docker as a non-root user i followed this topic

Finally to install an mastodon on arm architecture i followed this topic.

Indeed ‘docker-compose.yml’ files need some specific parameters to arm

first of all

version’2

secondly :

Postgres
image: armhf/postgres:9.6-alpine
Redis
image: armhf/redis

My installation isn’t ended but this fix my trouble.

Thanks a lot !

1 Like