Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dot net for linux 404 not found on execute build.sh #1733

Closed
tzitzimime opened this issue Aug 7, 2017 · 7 comments
Closed

dot net for linux 404 not found on execute build.sh #1733

tzitzimime opened this issue Aug 7, 2017 · 7 comments
Labels
Milestone

Comments

@tzitzimime
Copy link

The .net zip platform for linux can't be downloaded from https://dotnetcli.azureedge.net/dotnet/Sdk/1.0.4/dotnet-sdk-1.0.4-linux-x64.tar.gz and the install script fail

#######################################################
Installing .NET CLI...
[sudo] pasvorto por mixcoatl:
/home/mixcoatl/cake/.dotnet/dotnet-install.sh: linio 142: VERSION_ID: Neligita variablo
/home/mixcoatl/cake/.dotnet/dotnet-install.sh: linio 150: VERSION_ID: Neligita variablo
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/1.0.4/dotnet-sdk-1.0.4-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/1.0.4/dotnet-sdk-1.0.4-linux-x64.tar.gz

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
./build.sh: linio 54: /home/mixcoatl/cake/.dotnet/dotnet: Dosiero aŭ dosierujo ne ekzistas
Downloading NuGet...
Feeds used:
/home/mixcoatl/.nuget/packages/
https://api.nuget.org/v3/index.json

Attempting to gather dependency information for package 'Cake.0.21.1' with respect to project '/home/mixcoatl/cake/tools', targeting 'Any,Version=v0.0'
Gathering dependency information took 1.01 sec
Attempting to resolve dependencies for package 'Cake.0.21.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Cake.0.21.1'
Resolved actions to install package 'Cake.0.21.1'
Retrieving package 'Cake 0.21.1' from '/home/mixcoatl/.nuget/packages/'.
Adding package 'Cake.0.21.1' to folder '/home/mixcoatl/cake/tools'
Added package 'Cake.0.21.1' to folder '/home/mixcoatl/cake/tools'
Successfully installed 'Cake 0.21.1' to /home/mixcoatl/cake/tools
Executing nuget actions took 101.08 ms
Analyzing build script...
Processing build script...
Installing tools...
Installing addins...
Compiling build script...


Setup

Executing custom setup action...
Fetching verson from first SolutionInfo...
Building version 0.21.1.0 of Cake (Release, Travis) using version 0.21.1.0 of Cake. (IsTagged: False)
Build will use NET462 targeting pack since not building on Windows.

========================================
Clean

Executing task: Clean
Creating directory /home/mixcoatl/cake/artifacts/v0.21.1.0
Creating directory /home/mixcoatl/cake/artifacts/v0.21.1.0/test-results
Creating directory /home/mixcoatl/cake/artifacts/v0.21.1.0/nuget
Creating directory /home/mixcoatl/cake/artifacts/v0.21.1.0/bin
Creating directory /home/mixcoatl/cake/artifacts/v0.21.1.0/bin/net462
Creating directory /home/mixcoatl/cake/artifacts/v0.21.1.0/bin/netcoreapp1.0
Finished executing task: Clean

========================================
Restore-NuGet-Packages

Executing task: Restore-NuGet-Packages
An error occurred when executing task 'Restore-NuGet-Packages'.


Teardown

Executing custom teardown action...
Starting Teardown...
Finished running tasks.
Error: .NET Core CLI: Could not locate executable.

@gep13
Copy link
Member

gep13 commented Aug 7, 2017

@tzitzimime This URL https://dotnetcli.azureedge.net/dotnet/Sdk/1.0.4/dotnet-sdk-1.0.4-linux-x64.tar.gz result in what is essentially an HTTP 404, meaning that there is nothing there to download.

Where did you get this URL from?

@devlead
Copy link
Member

devlead commented Aug 7, 2017

We're using the standard script https://dot.net/v1/dotnet-install.sh which distribution Linux are you using?
Might be worth raising an issue at https://github.com/dotnet/cli/issues if your Linux dist is supported by them and it doesn't resolve to the right url.

@tzitzimime
Copy link
Author

tzitzimime commented Aug 8, 2017

@gep13 the url is in line 49 from build.sh
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh

@devlead I'm using Debian 9 / Linux version 4.5.0-2-amd64
yes the error is from dot.net installation script, using it give me

./dotnet-install.sh 
./dotnet-install.sh: linio 142: VERSION_ID: Unbound variable
./dotnet-install.sh: linio 150: VERSION_ID: Unbound variable
ldconfig is not in PATH, trying /sbin/ldconfig.
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/1.0.4/dotnet-sdk-1.0.4-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404 
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/1.0.4/dotnet-sdk-1.0.4-linux-x64.tar.gz

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

@devlead
Copy link
Member

devlead commented Aug 8, 2017

Could be that Debian 9 isn't supported by the official install script yet or one of pre-reqs are missing

Looking at https://www.microsoft.com/net/core#linuxdebian it looks like these are pre-reqs fot .NET Core

sudo apt-get install curl libunwind8 gettext

The script is provided by Microsoft, so if you have the pre-reqs installed and still facing issues then I suggest you raise an issue at https://github.com/dotnet/cli/issues

To build Cake Mono 4.4.2> and .NET CLI 1.0.4 needs to be in place, previously downloaded on Debian when building containers with

echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.4.2 main" > /etc/apt/sources.list.d/mono-xamarin.list \
	&& apt-get update \
	&& apt-get install -y mono-devel ca-certificates-mono fsharp mono-vbnc nuget

And .NET CLI

curl -SL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/1.0.4/dotnet-dev-debian-x64.1.0.4.tar.gz --output dotnet.tar.gz \
    && mkdir -p /usr/share/dotnet \
    && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
    && rm dotnet.tar.gz \
    && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet

@atsushieno
Copy link
Contributor

dotnet/cli does not actually support Linux. It only supports Ubuntu 14.04 and Ubuntu 16.04. Microsoft developers don't actually verify any builds, despite that they claim they do. I have already reported the problem there. And no further investigations were made.

Cake has some other issues that does not really consider Linux e.g. in https://github.com/cake-build/cake/blob/develop/src/Cake.Common/Tools/MSBuild/MSBuildResolver.cs tries to resolve msbuild paths only from Windows/VS2017 (which I was trying to find out why things don't work).

@atsushieno
Copy link
Contributor

(context: I found this issue when I was trying to build https://github.com/mono/embeddinator-4000/ )

@augustoproiete
Copy link
Member

Closed by #1749 and released with Cake v0.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants