.travis.yml 的配置如下
language: csharp
mono: none
sudo: required
dist: trusty
dotnet: 2.2
os:
- linux
script:
- ./build.sh
- ./test.sh
执行 travis ci job 时出现下面的错误
Unpacking dotnet-runtime-2.2 (2.2.0-1) ...
dpkg-deb: error: archive '/var/cache/apt/archives/aspnetcore-runtime-2.2_2.2.0-1_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/aspnetcore-runtime-2.2_2.2.0-1_amd64.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Selecting previously unselected package dotnet-sdk-2.2.
Preparing to unpack .../dotnet-sdk-2.2_2.2.101-1_amd64.deb ...
Unpacking dotnet-sdk-2.2 (2.2.101-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
/var/cache/apt/archives/aspnetcore-runtime-2.2_2.2.0-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command "sudo apt-get install -qq dotnet-sdk-2.2" failed and exited with 100 during .
请问如何解决?
将 dist: trusty
改为 dist: xenial
后问题解决
哈哈,前段时间我也遇到了,升级一下 ubuntu版本就好啦 Good Good