Skip to content

miniforge.sh: line 1: Not: command not found #274

Closed

Description

@aryarm

Hello! Thanks for creating these devcontainer-features. I've been running into an issue when trying to use the miniforge feature. I was wondering if anyone has an idea of what might be happening?

{
	"name": "Ubuntu",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
	"features": {
		"ghcr.io/rocker-org/devcontainer-features/miniforge:2": {}
	},
}
2026-03-11 16:38:35.479Z: #12 0.772 VERSION=26.1.1-0
2026-03-11 16:38:35.640Z: #12 0.772 Downloading Miniforge3 26.1.1-0...
#12 0.783 /tmp/miniforge /tmp/dev-container-features/miniforge_0
2026-03-11 16:38:35.760Z: #12 1.053 miniforge.sh: line 1: Not: command not found
2026-03-11 16:38:35.816Z: #12 1.054 ERROR: Feature "Conda, Mamba (Miniforge)" (ghcr.io/rocker-org/devcontainer-features/miniforge) failed to install! Look at the documentation at ********/rocker-org/devcontainer-features/tree/main/src/miniforge for help troubleshooting this error.
#12 ERROR: process "/bin/sh -c cp -ar /tmp/build-features-src/miniforge_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/miniforge_0  && cd /tmp/dev-container-features/miniforge_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/miniforge_0" did not complete successfully: exit code: 127

Activity

  1. eitsupi commented on Mar 11, 2026

    @eitsupi
    Member

    Maybe they changed the installer URL, I'll have a look when I have time.

  2. added theissue type on Mar 11, 2026
  3. eitsupi commented on Mar 11, 2026

    @eitsupi
    Member

    As a workaround, you can use the version option to specify a version before the URL scheme was changed, which should work.

  4. aryarm commented on Mar 12, 2026

    @aryarm
    ContributorAuthor

    thanks! your suggestion worked!

    	"features": {
    		"ghcr.io/rocker-org/devcontainer-features/miniforge:2": {
    			"version": "26.1.0-0"
    		}
    	},
    

    Looking through the code, it seems like it's just failing when it tries to download the URL here:

    install_miniforge() {
    local variant=$1
    local version=$2
    local conda_dir=$3
    local download_url
    download_url="https://github.com/conda-forge/miniforge/releases/download/${version}/${variant}-${version}-Linux-$(uname -m).sh"
    check_packages curl ca-certificates
    mkdir -p /tmp/miniforge
    pushd /tmp/miniforge
    curl -sLo miniforge.sh "${download_url}"
    chmod +x miniforge.sh
    /bin/bash miniforge.sh -b -p "${conda_dir}"

    Unfortunately, the latest release of miniforge (v26.1.1-0) was published as a pre-release without any of the usual assets, so install.sh is unable to download .sh files from it.

    I created #275 in an attempt to remedy this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions