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

Cannot install deno according to official documentation #1539

Open
marbug opened this issue Mar 6, 2025 · 0 comments
Open

Cannot install deno according to official documentation #1539

marbug opened this issue Mar 6, 2025 · 0 comments

Comments

@marbug
Copy link

marbug commented Mar 6, 2025

Hi.

I am trying to install deno according to the following documentation https://docs.deno.com/runtime/getting_started/installation/
I.e. I am using

curl -fsSL https://deno.land/install.sh | sh

on my Ubuntu Linux

cat /etc/os-release
is showing

PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Script is showing the following error:

#=#=#                                                                          Warning: Failed to open the file /home/marbug/.deno/bin/deno.zip: Permission 
Warning: denied
curl: (23) client returned ERROR on write of 1369 bytes

After digging a bit I found that code of current install.sh does not support the following value:
uname -sm
is returning
Linux x86_64
on my PC.

And code of install.sh is the following:

if [ "$OS" = "Windows_NT" ]; then
        target="x86_64-pc-windows-msvc"
else
        case $(uname -sm) in
        "Darwin x86_64") target="x86_64-apple-darwin" ;;
        "Darwin arm64") target="aarch64-apple-darwin" ;;
        "Linux aarch64") target="aarch64-unknown-linux-gnu" ;;
        *) target="x86_64-unknown-linux-gnu" ;;
        esac
fi

i.e. this makes install.sh to download zip from the following deno_uri: https://dl.deno.land/release/v2.2.3/deno-x86_64-unknown-linux-gnu.zip

And it looks like https://dl.deno.land/release/v2.2.3/deno-x86_64-unknown-linux-gnu.zip is absent ))

That's why there is no zip file and I am receiving
... Failed to open the file /home/marbug/.deno/bin/deno.zip ...

Does this mean that install.sh is broken or should something be fixed in documentation?

P.S. Hm. After playing a bit more it looks like curl is not able to download https://dl.deno.land/release/v2.2.3/deno-x86_64-unknown-linux-gnu.zip but my browser/Chrome is downloading it without any issue...

I.e. the following code is not working:

curl --fail --location --progress-bar --output "$exe.zip" "$deno_uri"

Should there be any requirement for curl version or something else?

P.P.S. I replaced

curl --fail --location --progress-bar --output "$exe.zip" "$deno_uri"

by

#curl --fail --location --progress-bar --output "$exe.zip" "$deno_uri"
wget -O "$exe.zip" "$deno_uri"

and install.sh is working as expected.

P.P.P.S. My current curl version is:
curl -V

curl 8.12.1 (x86_64-pc-linux-gnu) libcurl/8.12.1 OpenSSL/3.4.0 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 libssh2/1.11.0 nghttp2/1.59.0 nghttp3/1.7.0 librtmp/2.3 OpenLDAP/2.6.7
Release-Date: 2025-02-13
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

P.P.P.P.S. Hm. After removing curl and installing new one by apt-get install curl I have no error.
Should documentation contain requirement that curl cannot be 8.x installed from snap, but should be 7.x installed by apt-get install curl?
curl -V
is returning the following now:

curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd
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