Skip to content

Installation failed on Ubuntu using Bun #7314

Open
@MatteoGauthier

Description

@MatteoGauthier

Describe the bug

Installation failed on Ubuntu using Bun

# bun add -g netlify-cli
bun add v1.2.14 (6a363a38)
  ⚙️  netlify-cli [1/4] sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-linux-arm64v8.tar.br
sharp: Integrity check passed for linux-arm64v8

/usr/bin/bash: line 1: prebuild-install: command not found
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm64
gyp ERR! find Python 
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python 
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python 
gyp ERR! configure error 
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at fail (/tmp/bunx-0-node-gyp@latest/node_modules/node-gyp/lib/find-python.js:306:15)
gyp ERR! stack at processTicksAndRejections (native:7:39)
gyp ERR! System Linux 6.13.7-orbstack-00283-g9d1400e7e9c6
gyp ERR! command "/root/.bun/bin/bun" "/tmp/bunx-0-node-gyp@latest/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /root/.bun/install/global/node_modules/sharp
gyp ERR! node -v v22.6.0
gyp ERR! node-gyp -v v11.2.0
gyp ERR! not ok 

error: install script from "sharp" exited with 1

Steps to reproduce

  1. docker run --rm -it ubuntu
  2. apt update
  3. apt install -y unzip curl
  4. curl -fsSL https://bun.sh/install | bash
  5. source /root/.bashrc
  6. bun add -g netlify-cli

Configuration

No response

Environment


  System:
    OS: Linux 6.13 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (8) arm64 unknown
    Memory: 7.19 GB / 7.81 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.1.0 - ~/.local/state/fnm_multishells/3172_1748430203563/bin/node
    npm: 11.3.0 - ~/.local/state/fnm_multishells/3172_1748430203563/bin/npm
    bun: 1.2.14 - ~/.bun/bin/bun

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions