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

Not installing fnm due to missing dependencies #1385

Open
ganobrega opened this issue Feb 18, 2025 · 1 comment
Open

Not installing fnm due to missing dependencies #1385

ganobrega opened this issue Feb 18, 2025 · 1 comment

Comments

@ganobrega
Copy link

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
Copy link
Author

ganobrega commented Feb 18, 2025

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

Now I can use it smoothly.

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

1 participant