vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

vcpkg fetch nuget does not work in ubuntu-24.04-arm runner.

Open stripe2933 opened this issue 7 months ago • 3 comments

Describe the bug

Followed instruction in Microsoft Learn, the command vcpkg fetch nuget failed to execute.

Run mono `vcpkg fetch nuget | tail -n 1` sources add -Source "https://nuget.pkg.github.com/username/index.json" -Name GitHubPackages -UserName "username"***
  mono `vcpkg fetch nuget | tail -n 1` sources add -Source "https://nuget.pkg.github.com/username/index.json" -Name GitHubPackages -UserName "username"***
  mono `vcpkg fetch nuget | tail -n 1` setapikey "***" -Source "https://nuget.pkg.github.com/username/index.json"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    FEED_URL: https://nuget.pkg.github.com/username/index.json
    VCPKG_BINARY_SOURCES: clear;nuget,https://nuget.pkg.github.com/username/index.json,readwrite
error: Could not fetch nuget. A downloadable copy of this tool is available and can be used by unsetting $VCPKG_FORCE_SYSTEM_BINARIES. You may be able to install this tool via your system package manager.
note: updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.
Cannot open assembly 'sources': No such file or directory.

Only ubuntu-24.04-arm runner fails for this operation. windows-latest, macos-15 and ubuntu-latest were successfully executed it.

Environment

  • OS: Ubuntu 24.04 (ARM64)
  • Compiler: Clang 18

To Reproduce

In GitHub Action script:

apt install mono-devel
mono `vcpkg fetch nuget | tail -n 1` sources add -Source "${{ env.FEED_URL }}" -Name GitHubPackages -UserName "username" -Password "${{ secrets.GH_PACKAGES_TOKEN }}"
mono `vcpkg fetch nuget | tail -n 1` setapikey "${{ secrets.GH_PACKAGES_TOKEN }}" -Source "${{ env.FEED_URL }}"

Expected behavior

Following message should be shown.

Package source with Name: GitHubPackages added successfully.
The API Key '***' was saved for 'https://nuget.pkg.github.com/username/index.json'.

Failure logs

Runner Successful?
windows-latest
macos-15
ubuntu-latest
ubuntu-24.04-arm

stripe2933 avatar May 23 '25 14:05 stripe2933

I encountered a similar problem with ubuntu-latest which is now Ubuntu 24.04. In my case it tells me it can't find mono. As in the case reported here, it tells me the problem may be resolved by updating vcpkg by running bootstrap-vcpkg (it wasn't) or to install mono-complete using the system package manager.

After installing mono-complete the nuget fetch and source add worked. @stripe2933 probably it will work for you too if you install this rather than mono-devel.

Since the runner has vcpkg pre-installed it really should have everything it needs installed as well.

MarkCallow avatar Jun 09 '25 09:06 MarkCallow

I think this is more properly a bug against the 24.04 runner for not having the necessary packages.

ubuntu-22.04 has mono-complete and libldtl-dev installed which I needed and had to install via apt-get for my CI build to work. The latter was needed to build libxcrypt which vcpkg downloads and builds even though it is not a dependency of the package my app uses.

MarkCallow avatar Jun 12 '25 06:06 MarkCallow

I think this is more properly a bug against the 24.04 runner for not having the necessary packages.

See https://github.com/actions/runner-images/issues/12342.

MarkCallow avatar Jun 13 '25 07:06 MarkCallow

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Jul 13 '25 02:07 github-actions[bot]