Skip to content

WSL Issue when starting the CLI #181

Description

@digitalesch

Hey team,

Just found an issue when trying to install the cli fresh out of the command,

curl -fsSL https://girus.linuxtips.io | bash

which got me the following error on WSL, even though my GLIBC is greater then the required one.

Image

The error is actually not GLIBC related, as it's on the "bc" package dependency,

Could check something like this (the code was generated by ChatGPT)

`
ensure_bc_installed() {
# Apenas para Linux
if [ "$OS" != "linux" ]; then
return 0
fi

if command -v bc &> /dev/null; then
    return 0
fi

echo "$(t '📦 O comando bc não está instalado. Instalando automaticamente...' \
         '📦 El comando bc no está instalado. Instalándolo automáticamente...')"

if command -v apt &> /dev/null; then
    sudo apt update
    sudo apt install -y bc
elif command -v dnf &> /dev/null; then
    sudo dnf install -y bc
elif command -v yum &> /dev/null; then
    sudo yum install -y bc
elif command -v pacman &> /dev/null; then
    sudo pacman -Sy --noconfirm bc
else
    echo "$(t '❌ Não foi possível instalar bc automaticamente. Instale manualmente.' \
             '❌ No fue posible instalar bc automáticamente. Instálalo manualmente.')"
    exit 1
fi

}
`

and afterwards be called

`

Função para verificar a versão do GLIBC

check_glibc_version() {
# Skip GLIBC check on non-Linux systems
if [ "$OS" != "linux" ]; then
return 0
fi

ensure_bc_installed

`

Image

to make it work on WSL

Image

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions