Build dotnetcore with error The command "sudo apt-get install -qq dotnet-sdk-2.0.0" failed

C# support for Travis-CI is community maintained.

Please open any issues at https://travis-ci.community/c/languages/37-category and cc @joshua-anderson

Installing .NET Core

$ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1

$ export DOTNET_CLI_TELEMETRY_OPTOUT=1

7.63s0.47sE: Unable to locate package dotnet-sdk-2.0.0

E: Couldn’t find any package by glob ‘dotnet-sdk-2.0.0’

E: Couldn’t find any package by regex ‘dotnet-sdk-2.0.0’

The command “sudo apt-get install -qq dotnet-sdk-2.0.0” failed and exited with 100 during .

Your build has been stopped.

Below is the begining of travis.yml

language: csharp
sudo: required
mono: none
dotnet: 2.0.0

services:

  • docker

env:
global:

  • PROJECT=“Xyra”
  • PACKAGE_VERSION=“v1.2.${TRAVIS_BUILD_NUMBER}”
  • DOCKER_NS=“test”

before_script:

  • dotnet restore src/Xyra.sln

please Help to see what happened and why?

We aren’t sure where this is stemming from but a workaround is to run your build on our Xenial image by adding dist: xenial to your .travis.yml file. Could you try this out and let us know if it helps? Thanks!

1 Like

thanks dominic very much !
i added dist:xenial to travis.yml file,now it’s worked fine.

Glad to hear it! I’ll be closing this topic for now. Don’t hesitate to open a new one if this happens again.