Repository navigation
Closed
Labels
linux-compatibilityIssue with Linux compatibilityIssue with Linux compatibility
Description
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.
Reacted by Martin Costello
Metadata
Metadata
Assignees
Labels
linux-compatibilityIssue with Linux compatibilityIssue with Linux compatibility
Type
Projects
- StatusShow more project fieldsDone

Activity
baronfel commentedon Jun 3, 2025
Can you run the failing
dotnet-installinvocation with the--verboseflag so we can see detailed diagnostic output?mchaves27 commentedon Jun 3, 2025
Thanks for the suggestion! Sure, here are the complete logs from the start of the installation process:
baronfel commentedon Jun 3, 2025
@rbhanda this error seems to be happening when the latest.version files aren't found - are those updated like we were talking about yesterday? was this maybe a point-in-time issue with those and not something more systemic with curl?
martincostello commentedon Jun 8, 2025
Just ran into this myself on Ubuntu 24.04.
martincostello commentedon Jun 8, 2025
ci(scalar): try to work around but in actions/setup-dotnet
ci(scalar): try to work around but in actions/setup-dotnet
ci(scalar): work around bug in `actions/setup-dotnet`
ci(scalar): work around bug in `actions/setup-dotnet` (#765)
baronfel commentedon Jun 12, 2025
wow @martincostello - that suggests that it's not a curl change (since your version is older), but perhaps some latent http processing problem in the script.
ellahathaway commentedon Jun 12, 2025
I'm unable to repro this on CentOS 8 and Ubuntu 24.04. Will try on mac, since #616 describes the issue happening there too.
In the meantime, @martincostello, can you run the failing dotnet-install invocation with the
--verboseflag so I can see detailed diagnostic output? I'd like to compare it with the output in #610 (comment)martincostello commentedon Jun 12, 2025
Sure - I'll put something together tomorrow.
ellahathaway commentedon Jun 12, 2025
I was able to repro the issue on mac with curl 8.14.0. #617 will address the failures described in the original issue.
I'm still unable to repro with the conditions described in #610 (comment) and #610 (comment). Let's continue that discussion in a new issue if that error continues to persist, because it appears unrelated to curl/curl#17554
mchaves27 commentedon Jun 13, 2025
@ellahathaway and participants, thanks for the time and effort reproducing and resolving this.
I confirm the issue has been successfully fixed for RHEL8 🚀
nike4613 commentedon Jun 13, 2025
Is the fix available on aka.ms already?
ellahathaway commentedon Jun 13, 2025
@nike4613 - the fix will be deployed to the stable script soon. In the meantime, the fix in #617 has been merged in, so you can access the updated script here.
martincostello commentedon Jun 14, 2025
I don't seem to be able to repro it now. I just get an error telling me that
8.0is 404 (because it's onlymajor.minornotmajor.minor.patch).This is what I did:
ci(scalar): work around bug in `actions/setup-dotnet`
ci(scalar): work around bug in `actions/setup-dotnet` (#765)