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

ERROR: Error installing jekyll using RVM manager Debian GNU/Linux 11 #5334

Closed
meerasebastian21 opened this issue Mar 21, 2023 · 1 comment
Closed

Comments

@meerasebastian21
Copy link

Description

I was trying to create a Docker image that contains ruby, and bundler.For ruby installation, I am using rvm and ruby version is 3.1.2

Steps to reproduce

RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y --no-install-recommends make build-essential gnupg2 curl  zlib1g-dev procps  && \
    curl -sSL https://rvm.io/mpapis.asc | gpg2 --import && \ 
    curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import && \ 
    curl -sSL https://get.rvm.io | bash -s stable --ruby && \  
    apt-get autoclean && apt-get --purge --yes autoremove && \
  	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN /bin/bash -l -c ". /etc/profile.d/rvm.sh && source /usr/local/rvm/scripts/rvm && rvm install ruby-3.1.2 && rvm --default use ruby-3.1.2"

RUN /bin/bash -l -c "gem install bundler && gem --version && bundler --version && ruby -v && gem update --system"

RUN /bin/bash -l -c "gem install jekyll"

Expected behavior

Jekyll to be installed successfully

Actual behavior

17:00:44  #13 12.71 ERROR:  Error installing jekyll:
17:00:44  #13 12.71 	ERROR: Failed to build gem native extension.
17:00:44  #13 12.71 
17:00:44  #13 12.71     current directory: /usr/local/rvm/gems/ruby-3.1.2/gems/ffi-1.15.5/ext/ffi_c
17:00:44  #13 12.71 /usr/local/rvm/rubies/ruby-3.1.2/bin/ruby extconf.rb
17:00:44  #13 12.71 checking for ffi_prep_closure_loc() in -lffi... yes
17:00:44  #13 12.71 checking for ffi_prep_cif_var()... yes
17:00:44  #13 12.71 checking for ffi_raw_call()... yes
17:00:44  #13 12.71 checking for ffi_prep_raw_closure()... yes
17:00:44  #13 12.71 checking for whether -pthread is accepted as LDFLAGS... yes
17:00:44  #13 12.71 creating extconf.h
17:00:44  #13 12.71 creating Makefile
17:00:44  #13 12.71 
17:00:44  #13 12.71 current directory: /usr/local/rvm/gems/ruby-3.1.2/gems/ffi-1.15.5/ext/ffi_c
17:00:44  #13 12.71 make DESTDIR\= sitearchdir\=./.gem.20230321-244-lghe7c sitelibdir\=./.gem.20230321-244-lghe7c clean
17:00:44  #13 12.71 
17:00:44  #13 12.71 current directory: /usr/local/rvm/gems/ruby-3.1.2/gems/ffi-1.15.5/ext/ffi_c
17:00:44  #13 12.71 make DESTDIR\= sitearchdir\=./.gem.20230321-244-lghe7c sitelibdir\=./.gem.20230321-244-lghe7c
17:00:44  #13 12.71 compiling AbstractMemory.c
17:00:44  #13 12.71 compiling ArrayType.c
17:00:44  #13 12.71 compiling Buffer.c
17:00:44  #13 12.71 compiling Call.c
17:00:44  #13 12.71 compiling ClosurePool.c
17:00:44  #13 12.71 compiling DynamicLibrary.c
17:00:44  #13 12.71 compiling Function.c
17:00:44  #13 12.71 compiling FunctionInfo.c
17:00:44  #13 12.71 compiling LastError.c
17:00:44  #13 12.71 compiling LongDouble.c
17:00:44  #13 12.71 compiling MappedType.c
17:00:44  #13 12.71 compiling MemoryPointer.c
17:00:44  #13 12.71 compiling MethodHandle.c
17:00:44  #13 12.71 compiling Platform.c
17:00:44  #13 12.71 compiling Pointer.c
17:00:44  #13 12.71 compiling Struct.c
17:00:44  #13 12.71 compiling StructByValue.c
17:00:44  #13 12.71 compiling StructLayout.c
17:00:44  #13 12.71 compiling Thread.c
17:00:44  #13 12.71 compiling Type.c
17:00:44  #13 12.71 compiling Types.c
17:00:44  #13 12.71 compiling Variadic.c
17:00:44  #13 12.71 compiling ffi.c
17:00:44  #13 12.71 linking shared-object ffi_c.so
17:00:44  #13 12.71 
17:00:44  #13 12.71 current directory: /usr/local/rvm/gems/ruby-3.1.2/gems/ffi-1.15.5/ext/ffi_c
17:00:44  #13 12.71 make DESTDIR\= sitearchdir\=./.gem.20230321-244-lghe7c sitelibdir\=./.gem.20230321-244-lghe7c install
17:00:44  #13 12.71 make: /usr/bin/mkdir: No such file or directory
17:00:44  #13 12.71 make: *** [Makefile:203: .sitearchdir.time] Error 127
17:00:44  #13 12.71 
17:00:44  #13 12.71 make install failed, exit code 2
17:00:44  #13 12.71 
17:00:44  #13 12.71 Gem files will remain installed in /usr/local/rvm/gems/ruby-3.1.2/gems/ffi-1.15.5 for inspection.
17:00:44  #13 12.71 Results logged to /usr/local/rvm/gems/ruby-3.1.2/extensions/x86_64-linux/3.1.0/ffi-1.15.5/gem_make.out
17:00:45  #13 ERROR: process "/bin/sh -c /bin/bash -l -c \"gem install jekyll\"" did not complete successfully: exit code: 1

Debug mode:

Environment info

 PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
 NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
 ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
 BUG_REPORT_URL="https://bugs.debian.org/"
@raelgc
Copy link
Contributor

raelgc commented Mar 23, 2023

It appears your mkdir is not in the expected path and some MAKE file is relying on it.
Check which mkdir. If not at /usr/bin/mkdir, try sudo ln -s /bin/mkdir /usr/bin/mkdir.

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

2 participants