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

M1 Mac Trying to run DevContainer, Ruby installation error #1134

Open
mattkoch-bb opened this issue Oct 1, 2024 · 7 comments
Open

M1 Mac Trying to run DevContainer, Ruby installation error #1134

mattkoch-bb opened this issue Oct 1, 2024 · 7 comments
Assignees

Comments

@mattkoch-bb
Copy link

Hi all, I've been debugging this for the better part of my morning and can't seem to figure it out. Because I'm not able to start the container I can't see the error itself that the logs are telling me to look at (e.g. please read /usr/local/rvm/log/1727803064_ruby-2.7.6/install.log) - any idea on how to do that, or what coiuld be going on here?

I'm on an M1 Mac running Sonoma 14.3, and my devcontainer feature is using this ruby version

    "ghcr.io/devcontainers/features/ruby:1": {
      "version": "2.7.6"
    },

Log output:

30.27 Checking requirements for ubuntu.
30.37 Requirements installation successful.
30.42 Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.7.6, this may take a while depending on your cpu(s)...
30.45 ruby-2.7.6 - #downloading ruby-2.7.6, this may take a while depending on your connection...
30.49   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
30.49                                  Dload  Upload   Total   Spent    Left  Speed
100 14.1M  100 14.1M    0     0  18.4M      0 --:--:-- --:--:-- --:--:-- 18.4M
31.27 No checksum for downloaded archive, recording checksum in user configuration.
31.39 ruby-2.7.6 - #extracting ruby-2.7.6 to /usr/local/rvm/src/ruby-2.7.6.....
33.49 ruby-2.7.6 - #configuring........................................................................
47.96 ruby-2.7.6 - #post-configuration..
47.97 ruby-2.7.6 - #compiling.........................................................................................
165.9 ruby-2.7.6 - #installing.............
167.9 Error running '__rvm_make install',
167.9 please read /usr/local/rvm/log/1727803064_ruby-2.7.6/install.log
167.9 There has been an error while running make install. Halting the installation.
167.9 Failed to install Ruby version 2.7.6. Exiting...
168.1 Fixing group for :rvm - this might take a few long minutes...
168.2 Fixing rights with 'g+w' - this might take a few long minutes...
168.2 Finished fixing.
168.3 install: missing destination file operand after 'rake'
168.3 Try 'install --help' for more information.
168.3 ERROR: Feature "Ruby (via rvm)" (ghcr.io/devcontainers/features/ruby) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/ruby for help troubleshooting this error.
------
@ReubenKogie
Copy link

ReubenKogie commented Oct 1, 2024

Hi,
Getting a similar issue with installing the Java features also while building the container. Looks like a similar issue to #1031 (comment), but rebuilding errors persist.

Since I rebuilt without cache, I'm guessing it destroyed the cached container, so I can't rollback to a previous working version?

devcontainer.json:

 "features": {
    "ghcr.io/devcontainers-contrib/features/nx-npm:1": {},
    "ghcr.io/devcontainers-contrib/features/poetry:2": { "version": "1.8.3" },
    "ghcr.io/devcontainers-contrib/features/protoc:1": {},
    "ghcr.io/devcontainers/features/common-utils:2": {},
    "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
    "ghcr.io/devcontainers/features/python:1": { "version": "3.12" },
    "ghcr.io/devcontainers/features/java:1": {}
  },

Host Machine Specs:

  • Ubuntu 22.04 LTS (jammy)
  • Arch: x86_64

Output Logs:

0.129 ===========================================================================
0.129 Feature       : Java (via SDKMAN!)
0.129 Description   : Installs Java, SDKMAN! (if not installed), and needed dependencies.
0.129 Id            : ghcr.io/devcontainers/features/java
0.129 Version       : 1.6.1
0.129 Documentation : https://github.com/devcontainers/features/tree/main/src/java
0.129 Options       :
0.129     VERSION="latest"
0.129     ADDITIONALVERSIONS=""
0.129     JDKDISTRO="ms"
0.129     INSTALLGRADLE="false"
0.129     GRADLEVERSION="latest"
0.129     INSTALLMAVEN="false"
0.129     MAVENVERSION="latest"
0.129     INSTALLANT="false"
0.129     ANTVERSION="latest"
0.129     INSTALLGROOVY="false"
0.129     GROOVYVERSION="latest"
0.129 ===========================================================================
0.583 
0.583                                 -+syyyyyyys:
0.583                             `/yho:`       -yd.
0.583                          `/yh/`             +m.
0.583                        .oho.                 hy                          .`
0.583                      .sh/`                   :N`                `-/o`  `+dyyo:.
0.583                    .yh:`                     `M-          `-/osysoym  :hs` `-+sys:      hhyssssssssy+
0.583                  .sh:`                       `N:          ms/-``  yy.yh-      -hy.    `.N-````````+N.
0.583                `od/`                         `N-       -/oM-      ddd+`     `sd:     hNNm        -N:
0.583               :do`                           .M.       dMMM-     `ms.      /d+`     `NMMs       `do
0.583             .yy-                             :N`    ```mMMM.      -      -hy.       /MMM:       yh
0.583           `+d+`           `:/oo/`       `-/osyh/ossssssdNMM`           .sh:         yMMN`      /m.
0.583          -dh-           :ymNMMMMy  `-/shmNm-`:N/-.``   `.sN            /N-         `NMMy      .m/
0.583        `oNs`          -hysosmMMMMydmNmds+-.:ohm           :             sd`        :MMM/      yy
0.583       .hN+           /d:    -MMMmhs/-.`   .MMMh   .ss+-                 `yy`       sMMN`     :N.
0.583      :mN/           `N/     `o/-`         :MMMo   +MMMN-         .`      `ds       mMMh      do
0.583     /NN/            `N+....--:/+oooosooo+:sMMM:   hMMMM:        `my       .m+     -MMM+     :N.
0.583    /NMo              -+ooooo+/:-....`...:+hNMN.  `NMMMd`        .MM/       -m:    oMMN.     hs
0.583   -NMd`                                    :mm   -MMMm- .s/     -MMm.       /m-   mMMd     -N.
0.583  `mMM/                                      .-   /MMh. -dMo     -MMMy        od. .MMMs..---yh
0.583  +MMM.                                           sNo`.sNMM+     :MMMM/        sh`+MMMNmNm+++-
0.583  mMMM-                                           /--ohmMMM+     :MMMMm.       `hyymmmdddo
0.584  MMMMh.                  ````                  `-+yy/`yMMM/     :MMMMMy       -sm:.``..-:-.`
0.584  dMMMMmo-.``````..-:/osyhddddho.           `+shdh+.   hMMM:     :MmMMMM/   ./yy/` `:sys+/+sh/
0.584  .dMMMMMMmdddddmmNMMMNNNNNMMMMMs           sNdo-      dMMM-  `-/yd/MMMMm-:sy+.   :hs-      /N`
0.584   `/ymNNNNNNNmmdys+/::----/dMMm:          +m-         mMMM+ohmo/.` sMMMMdo-    .om:       `sh
0.584      `.-----+/.`       `.-+hh/`         `od.          NMMNmds/     `mmy:`     +mMy      `:yy.
0.584            /moyso+//+ossso:.           .yy`          `dy+:`         ..       :MMMN+---/oys:
0.584          /+m:  `.-:::-`               /d+                                    +MMMMMMMNh:`
0.584         +MN/                        -yh.                                     `+hddhy+.
0.584        /MM+                       .sh:
0.584       :NMo                      -sh/
0.584      -NMs                    `/yy:
0.584     .NMy                  `:sh+.
0.584    `mMm`               ./yds-
0.584   `dMMMmyo:-.````.-:oymNy:`
0.584   +NMMMMMMMMMMMMMMMMms:`
0.584     -+shmNMMMNmdy+:`
0.584 
0.584 
0.584                                                                  Now attempting installation...
0.584 
0.584 
0.584 Looking for a previous installation of SDKMAN...
0.584 Looking for unzip...
0.585 Looking for zip...
0.585 Looking for curl...
0.585 Looking for sed...
0.586 Installing SDKMAN scripts...
0.586 Create distribution directories...
0.591 Getting available candidates...
0.895 Prime platform file...
0.897 Prime the config file...
0.898 Installing script cli archive...
0.898 * Downloading...
######################################################################## 100.0%     
1.986 * Checking archive integrity...
1.992 * Extracting archive...
1.995 * Copying archive contents...
1.997 * Cleaning up...
1.999 
2.000 Installing script cli archive...
2.000 * Downloading...
######################################################################## 100.0%     
3.173 * Checking archive integrity...
3.293 * Extracting archive...
3.422 * Copying archive contents...
3.435 * Cleaning up...
3.441 
3.441 Set version to 5.18.2 ...
3.441 Set native version to 0.4.6 ...
3.441 
3.441 
3.441 
3.441 All done!
3.441 
3.441 
3.441 You are subscribed to the STABLE channel.
3.441 
3.441 Please open a new terminal, or run the following in the existing one:
3.441 
3.441     source "/usr/local/sdkman/bin/sdkman-init.sh"
3.442 
3.442 Then issue the following command:
3.442 
3.442     sdk help
3.442 
3.442 Enjoy!!!
3.451 Updating /etc/bash.bashrc and /etc/zsh/zshrc...
4.506 Version latest not found. Available versions:
4.506 
4.507 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/java for help troubleshooting this error.
------
Dockerfile.extended:62
--------------------
  61 |     ENV PATH="/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:${PATH}"
  62 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_4,target=/tmp/build-features-src/java_4 \
  63 | >>>     cp -ar /tmp/build-features-src/java_4 /tmp/dev-container-features \
  64 | >>>  && chmod -R 0755 /tmp/dev-container-features/java_4 \
  65 | >>>  && cd /tmp/dev-container-features/java_4 \
  66 | >>>  && chmod +x ./devcontainer-features-install.sh \
  67 | >>>  && ./devcontainer-features-install.sh \
  68 | >>>  && rm -rf /tmp/dev-container-features/java_4
  69 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/java_4 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_4  && cd /tmp/dev-container-features/java_4  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_4" did not complete successfully: exit code: 1

@pawaitemadisoncollege
Copy link

pawaitemadisoncollege commented Oct 2, 2024

Same issue as above with the Java feature - cropped up yesterday with a dev container that's been working for months.

UPDATE: this issue seems to be related to the latest version. If I use version 1.5.0 it works as expected: “ghcr.io/devcontainers/features/java:1.5.0

2024-10-02 15:37:47.321Z: #15 0.583 ===========================================================================
2024-10-02 15:37:47.321Z: #15 0.583 Feature       : Java (via SDKMAN!)
#15 0.583 Description   : Installs Java, SDKMAN! (if not installed), and needed dependencies.
#15 0.583 Id            : ghcr.io/devcontainers/features/java
#15 0.583 Version       : 1.6.1
2024-10-02 15:37:47.472Z: #15 0.583 Documentation : ********/devcontainers/features/tree/main/src/java
#15 0.583 Options       :
#15 0.583     VERSION="latest"
#15 0.583     ADDITIONALVERSIONS=""
#15 0.583     JDKDISTRO="ms"2024-10-02 15:37:47.473Z: 
#15 0.583     INSTALLGRADLE="false"
#15 0.583     GRADLEVERSION="latest"
#15 0.583     INSTALLMAVEN="false"
#15 0.583     MAVENVERSION="latest"
#15 0.583     INSTALLANT="********"
#15 0.583     ANTVERSION="latest"
#15 0.583     INSTALLGROOVY="false"
#15 0.583     GROOVYVERSION="latest"
#15 0.583 ===========================================================================
2024-10-02 15:37:47.651Z: #15 0.913 Version latest not found. Available versions:
2024-10-02 15:37:47.756Z: #15 0.914 
#15 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.
#15 ERROR: process "/bin/sh -c cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0" did not complete successfully: exit code: 1
2024-10-02 15:37:48.074Z: ------
 > [dev_containers_target_stage 5/6] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_0,target=/tmp/build-features-src/java_0     cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0:2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     INSTALLMAVEN="false"2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     MAVENVERSION="latest"2024-10-02 15:37:48.079Z: 
2024-10-02 15:37:48.079Z: 0.583     INSTALLANT="********"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     ANTVERSION="latest"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     INSTALLGROOVY="false"2024-10-02 15:37:48.081Z: 
2024-10-02 15:37:48.081Z: 0.583     GROOVYVERSION="latest"2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.082Z: 0.583 ===========================================================================2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.083Z: 0.913 Version latest not found. Available versions:2024-10-02 15:37:48.083Z: 
2024-10-02 15:37:48.083Z: 0.914 2024-10-02 15:37:48.084Z: 
2024-10-02 15:37:48.084Z: 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install2024-10-02 15:37:47.321Z: #15 0.583 ===========================================================================
2024-10-02 15:37:47.321Z: #15 0.583 Feature       : Java (via SDKMAN!)
#15 0.583 Description   : Installs Java, SDKMAN! (if not installed), and needed dependencies.
#15 0.583 Id            : ghcr.io/devcontainers/features/java
#15 0.583 Version       : 1.6.1
2024-10-02 15:37:47.472Z: #15 0.583 Documentation : ********/devcontainers/features/tree/main/src/java
#15 0.583 Options       :
#15 0.583     VERSION="latest"
#15 0.583     ADDITIONALVERSIONS=""
#15 0.583     JDKDISTRO="ms"2024-10-02 15:37:47.473Z: 
#15 0.583     INSTALLGRADLE="false"
#15 0.583     GRADLEVERSION="latest"
#15 0.583     INSTALLMAVEN="false"
#15 0.583     MAVENVERSION="latest"
#15 0.583     INSTALLANT="********"
#15 0.583     ANTVERSION="latest"
#15 0.583     INSTALLGROOVY="false"
#15 0.583     GROOVYVERSION="latest"
#15 0.583 ===========================================================================
2024-10-02 15:37:47.651Z: #15 0.913 Version latest not found. Available versions:
2024-10-02 15:37:47.756Z: #15 0.914 
#15 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.
#15 ERROR: process "/bin/sh -c cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0" did not complete successfully: exit code: 1
2024-10-02 15:37:48.074Z: ------
 > [dev_containers_target_stage 5/6] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_0,target=/tmp/build-features-src/java_0     cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0:2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     INSTALLMAVEN="false"2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     MAVENVERSION="latest"2024-10-02 15:37:48.079Z: 
2024-10-02 15:37:48.079Z: 0.583     INSTALLANT="********"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     ANTVERSION="latest"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     INSTALLGROOVY="false"2024-10-02 15:37:48.081Z: 
2024-10-02 15:37:48.081Z: 0.583     GROOVYVERSION="latest"2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.082Z: 0.583 ===========================================================================2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.083Z: 0.913 Version latest not found. Available versions:2024-10-02 15:37:48.083Z: 
2024-10-02 15:37:48.083Z: 0.914 2024-10-02 15:37:48.084Z: 
2024-10-02 15:37:48.084Z: 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.2024-10-02 15:37:48.085Z: 
2024-10-02 15:37:48.085Z: ------2024-10-02 15:37:48.085Z: 
2024-10-02 15:37:48.086Z: Dockerfile.extended:26
--------------------
  25 |     ENV PATH="/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:${PATH}"
  26 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_0,target=/tmp/build-features-src/java_0 \
  27 | >>>     cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features \
2024-10-02 15:37:48.086Z:   28 | >>>  && chmod -R 0755 /tmp/dev-container-features/java_0 \
  29 | >>>  && cd /tmp/dev-container-features/java_0 \
  30 | >>>  && chmod +x ./devcontainer-features-install.sh \
  31 | >>>  && ./devcontainer-features-install.sh \
  32 | >>>  && rm -rf /tmp/dev-container-features/java_02024-10-02 15:37:48.087Z: 
  33 |     
--! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.2024-

@ReubenKogie
Copy link

@pawaitemadisoncollege - Great, rollback seems to be working!

@kevcube
Copy link

kevcube commented Oct 2, 2024

@mattkoch-bb have you tried other ruby versions? I recall having ruby installation issues on arm macs because there weren't published releases for my specific version and the build was failing, these were most easily solved just by upgrading to a later release. Try at least 2.7.8, shouldn't break any compatibility.

partridgeworks referenced this issue Oct 15, 2024
* Add JDK 22 support

* bump patch version

* removed exit added for debugging

* added one condition before changing the JDK_DISTRO

* version set to 21 and jdk_distro open fixed

* failed test cases fixed

* fixing install_type issue if not java

* yum update with epel-release install

* explicit test case writen to validate jdk 22 works fine

* moved check_packages to the start

* INSTALL_CMD moved to start

* variable changed
@partridgeworks
Copy link

Exactly the same issue here, cannot build devcontainer locally with this latest version of the java feature.

I've reached out to the author of the commit - see above.

@prathameshzarkar9
Copy link
Contributor

Hi @samruddhikhandale ,
Please find the new PR for the fix.
#1152

@mattkoch-bb
Copy link
Author

Anyone having the Ruby issue like the original post was about? 😅

@Mathiyarasy Mathiyarasy self-assigned this Nov 27, 2024
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

7 participants