core icon indicating copy to clipboard operation
core copied to clipboard

Cannot install .NET Core 2.0 on Amazon Linux AMI

Open goforgold opened this issue 9 years ago • 37 comments

I am trying to update from .NET Core 2.0 Preview 2 Final to 2.0 Final Release on the Amazon EC2 instance due to some dependency issue.

When I run install command sudo yum install dotnet-sdk-2.0.0 it produces following error.

Error: Package: dotnet-runtime-2.0.0-2.0.0-1.x86_64 (packages-microsoft-com-prod)
           Requires: openssl-libs

And, when I try to install openssl-libs using package manager with command yum install openssl-libs, it says No package openssl-libs available.

I've checked package repository and didn't found any package with name openssl-libs there. However, openssl is installed already in the machine, I confirmed that by running openssl version command. The version is 1.0.1k-fips 8 Jan 2015.

Please suggest how to resolve this dependency.

goforgold avatar Sep 02 '17 12:09 goforgold

You might have better luck following the instructions here:

https://github.com/dotnet/core/blob/0b1a1631593d6d379fbdfe2b23597a5c25ea4fc9/Documentation/build-and-install-rhel6-prerequisites.md

Amazon Linux already has a later version of curl, so you might need libcurl-devel installed as well.

heathhey avatar Sep 04 '17 16:09 heathhey

I managed to install .NET Core 2.0 using the source code as instructed here.

I didn't find any complexity in that way. It hardly took 10 minutes to get everything setup.

goforgold avatar Sep 11 '17 03:09 goforgold

I was almost desperate. I tries many ways, none of them can work for me.

Afterwards, I download the .NET Core 2.0 runtime directly with following link:

https://download.microsoft.com/download/5/F/0/5F0362BD-7D0A-4A9D-9BF9-022C6B15B04D/dotnet-runtime-2.0.0-linux-x64.tar.gz

And, use the old fashion way like installing .net core 1.1 with commands:

sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet-runtime-2.0.0-linux-x64.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin

It worked. Very simple like you used to do.

hchungi avatar Sep 11 '17 05:09 hchungi

Does not work with Amazon Linux when following these instructions.

[ec2-user@ip-xx-xx-xx-xx ~]$ sudo yum install dotnet-sdk-2.0.0
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package dotnet-sdk-2.0.0.x86_64 0:2.0.0-1 will be installed
--> Processing Dependency: dotnet-runtime-2.0.0 >= 2.0.0 for package: dotnet-sdk-2.0.0-2.0.0-1.x86_64
--> Processing Dependency: aspnetcore-store-2.0.0 >= 2.0.0 for package: dotnet-sdk-2.0.0-2.0.0-1.x86_64
--> Running transaction check
---> Package aspnetcore-store-2.0.0.x86_64 0:2.0.0-1 will be installed
---> Package dotnet-runtime-2.0.0.x86_64 0:2.0.0-1 will be installed
--> Processing Dependency: openssl-libs for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64
--> Processing Dependency: dotnet-hostfxr-2.0.0 for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64
--> Running transaction check
---> Package dotnet-hostfxr-2.0.0.x86_64 0:2.0.0-1 will be installed
--> Processing Dependency: dotnet-host >= 2.0.0 for package: dotnet-hostfxr-2.0.0-2.0.0-1.x86_64
---> Package dotnet-runtime-2.0.0.x86_64 0:2.0.0-1 will be installed
--> Processing Dependency: openssl-libs for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64
--> Running transaction check
---> Package dotnet-host.x86_64 0:2.0.0-1 will be installed
---> Package dotnet-runtime-2.0.0.x86_64 0:2.0.0-1 will be installed
--> Processing Dependency: openssl-libs for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64
--> Finished Dependency Resolution
Error: Package: dotnet-runtime-2.0.0-2.0.0-1.x86_64 (packages-microsoft-com-prod)
           Requires: openssl-libs
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

zl4bv avatar Sep 28 '17 04:09 zl4bv

If you already have openssl you can try to run yum with --skip-broken (as the message suggests) All what dotnet needs is to find dynamic libraries from openssl. (and libcurl)

wfurt avatar Sep 28 '17 04:09 wfurt

BTW AMI Linux is NOT one of the supported and test platforms. There should be no surprise that there are some bumps. This is one reason for publishing the tar file so you do not need to fight package dependencies.

wfurt avatar Sep 28 '17 04:09 wfurt

If you want to use AWS, drop it in Docker and use ECS.

h3smith avatar Sep 28 '17 04:09 h3smith

Like hchungi said, I just did:

Download .NET Core 2.0.0 runtime libraries (always check if URL is right, maybe it can be changed): wget https://download.microsoft.com/download/5/F/0/5F0362BD-7D0A-4A9D-9BF9-022C6B15B04D/dotnet-runtime-2.0.0-linux-x64.tar.gz

Create folder to .NET Core and extract your tar.gz:

mkdir -p $HOME/dotnet && tar zxf dotnet-runtime-2.0.0-linux-x64.tar.gz -C $HOME/dotnet

Finally, export dotnet to globally variable: export PATH=$PATH:$HOME/dotnet

Just it :)

Paschoali avatar Oct 06 '17 16:10 Paschoali

This is exactly how I did this around a month ago.

Thank you very much to confirm the solution.

On 06-Oct-2017 21:31, "Bruno Paschoali Regis" [email protected] wrote:

Like hchungi said, I just did:

Download .NET Core 2.0.0 runtime libraries (always check if URL is right, maybe it can be changed): wget https://download.microsoft.com/download/5/F/0/5F0362BD- 7D0A-4A9D-9BF9-022C6B15B04D/dotnet-runtime-2.0.0-linux-x64.tar.gz

Create folder to .NET Core and extract your tar.gz:

mkdir -p $HOME/dotnet && tar zxf dotnet-runtime-2.0.0-linux-x64.tar.gz -C $HOME/dotnet

Finally, export dotnet to globally variable: export PATH=$PATH:$HOME/dotnet

Just it :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dotnet/core/issues/930#issuecomment-334797494, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpaVdhf_5I669PIpGH-5LqGA8H83mSCks5spk7JgaJpZM4PK47F .

goforgold avatar Oct 06 '17 16:10 goforgold

Sounds like people have found a good solution. I'm going to close this out now.

Petermarcu avatar Oct 06 '17 16:10 Petermarcu

But I wish if I could install this simply using package manager on AWS AMI.

On 06-Oct-2017 21:55, "Peter Marcu" [email protected] wrote:

Sounds like people have found a good solution. I'm going to close this out now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dotnet/core/issues/930#issuecomment-334803730, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpaVZb1hBFEZ3GcMuot2i26cZiFmhQiks5splSFgaJpZM4PK47F .

goforgold avatar Oct 06 '17 16:10 goforgold

Any chance you could try a distribution other than Amazon Linux? The .NET Core project publishes packages for several distributions (such as CentOS, Debian, Ubuntu) and several other distributions are now starting to carry .NET Core too (such as Arch, CentOS, Fedora, RHEL). I dont know if we have a way to contribute packages to Amazon Linux directly.

omajid avatar Oct 06 '17 16:10 omajid

Yes, I've been told the Centos one works: https://www.microsoft.com/net/core#linuxcentos

Petermarcu avatar Oct 06 '17 16:10 Petermarcu

I would assume that someone needs to work with AWS to get .NET Core into their package feed.

Petermarcu avatar Oct 06 '17 16:10 Petermarcu

Yes, I thought about that and researched on that too.

But, many resources suggests that AWS AMI perofoms best in AWS infrastructures.

On 06-Oct-2017 22:05, "Omair Majid" [email protected] wrote:

Any chance you could try a distribution other than Amazon Linux? The .NET Core project publishes packages for several distributions (such as CentOS, Debian, Ubuntu) and several other distributions are now starting to carry .NET Core too (such as Arch, CentOS, Fedora, RHEL). I dont know if we have a way to contribute packages to Amazon Linux directly.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dotnet/core/issues/930#issuecomment-334806056, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpaVbvaBiUBObEdMh3psUzFHrdJJFd2ks5spla3gaJpZM4PK47F .

goforgold avatar Oct 06 '17 16:10 goforgold

I use the Aliyun ECS,The OS version is Centos 6.8. I also met this problem.The Information like this: [root@iZwz9bh8rvZ ~]# sudo yum install dotnet-sdk-2.0.0 Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package dotnet-sdk-2.0.0.x86_64 0:2.0.0-1 will be installed --> Processing Dependency: dotnet-runtime-2.0.0 >= 2.0.0 for package: dotnet-sdk-2.0.0-2.0.0-1.x86_64 --> Processing Dependency: aspnetcore-store-2.0.0 >= 2.0.0 for package: dotnet-sdk-2.0.0-2.0.0-1.x86_64 --> Running transaction check ---> Package aspnetcore-store-2.0.0.x86_64 0:2.0.0-1 will be installed ---> Package dotnet-runtime-2.0.0.x86_64 0:2.0.0-1 will be installed --> Processing Dependency: openssl-libs for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64 --> Processing Dependency: dotnet-hostfxr-2.0.0 for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64 --> Running transaction check ---> Package dotnet-hostfxr-2.0.0.x86_64 0:2.0.0-1 will be installed --> Processing Dependency: dotnet-host >= 2.0.0 for package: dotnet-hostfxr-2.0.0-2.0.0-1.x86_64 ---> Package dotnet-runtime-2.0.0.x86_64 0:2.0.0-1 will be installed --> Processing Dependency: openssl-libs for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64 --> Running transaction check ---> Package dotnet-host.x86_64 0:2.0.0-1 will be installed ---> Package dotnet-runtime-2.0.0.x86_64 0:2.0.0-1 will be installed --> Processing Dependency: openssl-libs for package: dotnet-runtime-2.0.0-2.0.0-1.x86_64 --> Finished Dependency Resolution Error: Package: dotnet-runtime-2.0.0-2.0.0-1.x86_64 (packages-microsoft-com-prod) Requires: openssl-libs You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

robyle avatar Oct 11 '17 09:10 robyle

Aliyun ECS? Whatever, did you read the comments? We suggested some solutions. Sure that of them will help you.

Paschoali avatar Oct 11 '17 13:10 Paschoali

Is there a SRPM for the dotnet-runtime package? Or is there a spec file in the repo somewhere? I couldn't find one.

heathhey avatar Oct 11 '17 17:10 heathhey

Is there a SRPM for the dotnet-runtime package? Or is there a spec file in the repo somewhere?

We use fpm to produce RPMs (and debs) instead of using rpmbuild. There are no SPRMs or spec files because of that.

The configuration for -runtime and -host RPMs is available here: https://github.com/dotnet/core-setup/tree/master/src/pkg/packaging/rpm

Here is the source that reads that config files above to build command line for fpm: https://github.com/dotnet/core-setup/blob/master/tools-local/tasks/BuildFPMToolPreReqs.cs

omajid avatar Oct 11 '17 17:10 omajid

The old links may not work so go here https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.0-download.md and use the SDK binary link for the latest tar.gz file.

ozyman42 avatar Nov 30 '17 11:11 ozyman42