Skip to content

dotnet-install.sh fails with curl 8.14.0 #610

Closed
@mchaves27

Description

@mchaves27

Issue Summary: When installing .NET using the dotnet-install.sh script, the installation fails with the error:
/usr/local/bin/dotnet-install.sh: line 1380: link_types[$link_index]: unbound variable
This issue started occurring after upgrading curl from version 8.13.0 to 8.14.0.

Environment:
Base Image: Red Hat Enterprise Linux (RHEL) 8
Shell: /bin/sh (within Docker build)
dotnet-install.sh Source: Private GitHub Proxy Repository
Previous curl Version (Working): 8.13.0
Current curl Version (Failing): 8.14.0

Steps to reproduce:
Build a Docker image using RHEL 8 as the base.
Add custom curl and dotnet installation:

RUN CURL_SOURCE_URL=$(curl -sSL https://api.github.com/repos/curl/curl/releases/latest | jq -r '.assets[] | select(.name | endswith(".tar.gz")) | .browser_download_url' | sed 's/github\.com/some-private-repository\/repository\/github-proxy/') \
  && curl -sSL $CURL_SOURCE_URL -o curl.tar.gz \
  && tar -xzf curl.tar.gz \
  && rm -f curl.tar.gz \
  && CURL_LOCATION=$(ls -d curl-*/) \
  && pushd ${CURL_LOCATION} \
  && ./configure \
  --enable-static --disable-shared \
  --with-openssl --with-brotli --with-zstd \
  --with-nghttp2 \
  --with-libidn2 --with-libssh2 \
  --enable-hsts --enable-mime --enable-cookies \
  --enable-http-auth --enable-manual \
  --enable-proxy --enable-file --enable-http \
  --enable-ftp --enable-telnet --enable-tftp \
  --enable-pop3 --enable-imap --enable-smtp \
  --enable-gopher --enable-mqtt \
  --enable-doh --enable-dateparse --enable-verbose \
  --enable-alt-svc --enable-websockets \
  --enable-ipv6 --enable-unix-sockets --enable-socketpair \
  --enable-headers-api --enable-versioned-symbols \
  --enable-optimize --enable-pthreads \
  --enable-warnings --enable-werror \
  --enable-curldebug --enable-dict --enable-netrc \
  --enable-bearer-auth --enable-tls-srp --enable-dnsshuffle \
  --enable-get-easy-options --enable-progress-meter \
  --with-ca-bundle=/etc/ssl/certs/ca-bundle.crt \
  --with-ca-path=/etc/ssl/certs \
  --with-ca-fallback \
  --disable-ldap --disable-ldaps \
  && make \
  && make install \
  && popd \
  && rm -rf ${CURL_LOCATION}

# Install dotnet:

curl --retry 10 --retry-all-errors -sSL https://some-private-repository/repository/github-proxy/dotnet/install-scripts/archive/refs/heads/main.zip -o dotnet-install.zip && \
unzip -j dotnet-install.zip install-scripts-main/src/dotnet-install.sh -d /usr/local/bin && \
rm -f dotnet-install.zip && \
chmod +x /usr/local/bin/dotnet-install.sh && \
dotnet-install.sh -c 8.0 && dotnet-install.sh -c 9.0 && \`
dotnet --info

Output for curl installation 8.14.0 :

#17 9.941 Complete!
#17 10.05 curl 8.14.0 (x86_64-pc-linux-gnu) libcurl/8.14.0 OpenSSL/1.1.1k-fips zlib/1.2.11 brotli/1.0.6 zstd/1.4.4 libpsl/0.20.2 libssh2/1.11.1
#17 10.05 Release-Date: 2025-05-28
#17 10.05 Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
#17 10.05 Features: alt-svc AsynchDNS brotli HSTS HTTPS-proxy IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP TrackMemory UnixSockets zstd
#17 DONE 10.1s

Output for donet installation :

#21 1.419 Archive:  dotnet-install.zip
#21 1.419 28ba87d0c95854ac6255659209364b7c2b0130e8
#21 1.424   inflating: /usr/local/bin/dotnet-install.sh  
#21 8.137 /usr/local/bin/dotnet-install.sh: line 1380: link_types[$link_index]: unbound variable
#21 ERROR: process "/bin/sh -c curl --retry 10 --retry-all-errors -sSL https://some-private-repositoryt/repository/github-proxy/dotnet/install-scripts/archive/refs/heads/main.zip -o dotnet-install.zip   && unzip -j dotnet-install.zip install-scripts-main/src/dotnet-install.sh -d /usr/local/bin   && rm -f dotnet-install.zip   && chmod +x /usr/local/bin/dotnet-install.sh   && dotnet-install.sh -c 8.0   && dotnet-install.sh -c 9.0   && dotnet --info " did not complete successfully: exit code: 1

Output using curl 8.13.0.

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions