$ sudo apt-get install dotnet-sdk-2.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dotnet-sdk-2.1 : Depends: dotnet-runtime-2.1 (>= 2.1.5) but it is not going to be installed
Depends: aspnetcore-runtime-2.1 (>= 2.1.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How do I correct this problem?
@leecow
Works fine on a green Debian 9 Docker image for me so let's figure out what you're missing. Can you try to install the dependency package by itself? This will tell us which system dependency you're not getting to.
sudo apt install dotnet-runtime-deps-2.1
i try that but i get this error:
sudo apt install dotnet-runtime-deps-2.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dotnet-runtime-deps-2.1 : Depends: libicu57 but it is not installable
E: Unable to correct problems, you have held broken packages.
_Depends: libicu57 but it is not installable_
and i get this error
$ sudo apt-get install libicu57
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libicu57 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libicu57' has no installation candidate
why i get this error?
Interesting. According to https://packages.debian.org/search?keywords=libicu57, the package is available in the stable repo which is what I see on my machine and I would expect to be accessible in any default install unless it's deliberately blocked or removed.
root@8e8c6d6375ce:/etc/apt# apt search libicu57
Sorting... Done
Full Text Search... Done
libicu57/stable,stable 57.1-6+deb9u2 amd64
International Components for Unicode
libicu57-dbg/stable,stable 57.1-6+deb9u2 amd64
International Components for Unicode (debug symbols)
Run: find /etc/apt -type f -exec grep "debian stretch main" '{}' \; -print
. If you don't something like following is not returned, you'll need to add deb http://deb.debian.org/debian stretch main
to /etc/apt/sources.list
.
deb http://deb.debian.org/debian stretch main
/etc/apt/sources.list
i dont find in my machine the file libicu57 but i find libicu60!!
$ sudo apt search libicu57
Sorting... Done
Full Text Search... Done
$ sudo apt search libicu60
Sorting... Done
Full Text Search... Done
libicu60/stable,now 60.2-6 amd64 [installed]
International Components for Unicode
and I do not know how to correct this
Have you tried @leecow's suggestion above to add the source.list?
According to https://packages.debian.org/search?keywords=libicu60, libicu60 is only available on a testing and unstable repo. Seems like you may not have stable registered on your system. Checking your sources.list contents will give us this answer.
this is the content of my sources.list file
deb http://deb.debian.org/debian/ stretch main non-free contrib
deb-src http://deb.debian.org/debian/ stretch main non-free contrib
deb http://security.debian.org/debian-security stretch/updates main contrib non$
deb-src http://security.debian.org/debian-security stretch/updates main contrib$
deb http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free
deb http://www.deb-multimedia.org stretch main non-free
there is something wrong in this file?
i gonna try remove all dependency files and purge, and i try install again.
I do this and I can not solve this problem.
I close this problem because I download binary files, installs and works well
You need to add deb http://deb.debian.org/debian stretch main
then it will work as expected.
@leecow running into the same issue here and I have this line in the sources.list
Any other idea?
@cheesemacfly - same issue meaning unable to install because libicu57 cannot be found when attempting to install on Debian 9?
Could you also let me know how you acquired Debian 9? That will give me a better chance at seeing what you are encountering.
cc @rakeshsinghranchi
Subsequently, if you'd like to know how to get this working on Debian Buster:
Follow the instructions here. You can certainly perform the apt-get update
, but skip attempting to install anything - it won't work of course.
Then:
mkdir ~/tmp
cd ~/tmp
apt-get download aspnetcore-runtime-2.2 dotnet-runtime-2.2 dotnet-sdk-2.2 dotnet-runtime-deps-2.2 dotnet-hostfxr-2.2 dotnet-host liblttng-ust0 liblttng-ust-ctl4 liburcu6
sudo dpkg -i --ignore-depends=libicu57 *.deb
(Add any other missing deps you might have that are installable, minus libicu57 of course, to the apt-get download command)
And you should get:
(Reading database ... 359583 files and directories currently installed.)
Preparing to unpack aspnetcore-runtime-2.2_2.2.0-1_amd64.deb ...
Unpacking aspnetcore-runtime-2.2 (2.2.0-1) over (2.2.0-1) ...
Selecting previously unselected package dotnet-host.
Preparing to unpack dotnet-host_2.2.0-1_amd64.deb ...
Unpacking dotnet-host (2.2.0-1) ...
Selecting previously unselected package dotnet-hostfxr-2.2.
Preparing to unpack dotnet-hostfxr-2.2_2.2.0-1_amd64.deb ...
Unpacking dotnet-hostfxr-2.2 (2.2.0-1) ...
Preparing to unpack dotnet-runtime-2.2_2.2.0-1_amd64.deb ...
Unpacking dotnet-runtime-2.2 (2.2.0-1) over (2.2.0-1) ...
Preparing to unpack dotnet-runtime-deps-2.2_2.2.0-1_amd64.deb ...
Unpacking dotnet-runtime-deps-2.2 (2.2.0-1) over (2.2.0-1) ...
Preparing to unpack dotnet-sdk-2.2_2.2.101-1_amd64.deb ...
Unpacking dotnet-sdk-2.2 (2.2.101-1) over (2.2.101-1) ...
Preparing to unpack liblttng-ust0_2.10.2-1_amd64.deb ...
Unpacking liblttng-ust0:amd64 (2.10.2-1) over (2.10.2-1) ...
Preparing to unpack liblttng-ust-ctl4_2.10.2-1_amd64.deb ...
Unpacking liblttng-ust-ctl4:amd64 (2.10.2-1) over (2.10.2-1) ...
Preparing to unpack liburcu6_0.10.1-2_amd64.deb ...
Unpacking liburcu6:amd64 (0.10.1-2) over (0.10.1-2) ...
Setting up dotnet-host (2.2.0-1) ...
Setting up dotnet-hostfxr-2.2 (2.2.0-1) ...
Setting up liburcu6:amd64 (0.10.1-2) ...
Setting up liblttng-ust-ctl4:amd64 (2.10.2-1) ...
Setting up liblttng-ust0:amd64 (2.10.2-1) ...
Setting up dotnet-runtime-deps-2.2 (2.2.0-1) ...
Setting up dotnet-runtime-2.2 (2.2.0-1) ...
Setting up aspnetcore-runtime-2.2 (2.2.0-1) ...
Setting up dotnet-sdk-2.2 (2.2.101-1) ...
This software may collect information about you and your use of the software, and send that to Microsoft.
Please visit http://aka.ms/dotnet-cli-eula for more information.
Welcome to .NET Core!
---------------------
Learn more about .NET Core: https://aka.ms/dotnet-docs
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
Configuring...
--------------
A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Processing triggers for man-db (2.8.4-3) ...
Processing triggers for libc-bin (2.28-2) ...
At which point it worked for me, using libicu60.
:smile_cat:
Most helpful comment
Subsequently, if you'd like to know how to get this working on Debian Buster:
Follow the instructions here. You can certainly perform the
apt-get update
, but skip attempting to install anything - it won't work of course.Then:
(Add any other missing deps you might have that are installable, minus libicu57 of course, to the apt-get download command)
And you should get:
At which point it worked for me, using libicu60.
:smile_cat: