fnm icon indicating copy to clipboard operation
fnm copied to clipboard

Not installing fnm due to missing dependencies

Open ganobrega opened this issue 1 year ago • 2 comments

Description

The installation script fails silently when unzip is not present in the system. This can be confusing for users as there's no clear error message indicating the missing dependency.

Current Behavior

When running:

$ sudo curl -fsSL https://fnm.vercel.app/install | bash

Checking dependencies for the installation script...
Checking availability of curl... OK!
Checking availability of unzip... Missing!
Not installing fnm due to missing dependencies.

The installation fails without any clear indication that unzip is required.

Expected Behavior

The installation script should:

  1. Check if unzip is installed
  2. If not installed, show a clear error message like:
    Error: 'unzip' is required but not installed.
    Please install it using:
    - For Debian/Ubuntu: sudo apt-get install unzip
    - For Fedora: sudo dnf install unzip
    - For macOS: brew install unzip
    

System Information

  • OS: Ubuntu (or your specific Linux distribution)
  • fnm installation method: curl install script

Suggested Solution

Add a dependency check at the beginning of the installation script:

if ! command -v unzip &> /dev/null; then
echo "Error: 'unzip' is required but not installed."
echo "Please install it using your package manager:"
echo "- For Debian/Ubuntu: sudo apt-get install unzip"
echo "- For Fedora: sudo dnf install unzip"
echo "- For macOS: brew install unzip"
exit 1
fi

ganobrega avatar Feb 18 '25 18:02 ganobrega

After running sudo apt-get install unzip, the fnm installation completed successfully. ✅

Now I can use it smoothly.

ganobrega avatar Feb 18 '25 18:02 ganobrega

Thank you,this is helpful to me

antnesswcm avatar Oct 21 '25 07:10 antnesswcm