Good morning, everyone!
I’m trying to install the Dotnet SDK 6.0.200 on Endeavour, but I can’t find any packages with that. The ones available on AUR install the 6.0.200 runtime but the 6.0.102 SDK. Unfortunately I really need the newest SDK version for the projects I work for.
O debian based distros, MS will provide a repo for APT which has the most up to date SDK, so I’ve been able to use Ubuntu, but I really wanted to try Endeavour.
If anyone could help me, I’d appreciate very much!
Thanks for your attention. =)
moson
March 6, 2022, 12:52pm
2
You’d need to wait for the maintainer to update them.
There is an option in the AUR as well as repository packages to flag a package as out-of-date and thus let the maintainer know that there is a new software version available.
If you can’t wait for that to happen, you can download the PKGBUILD, etc. modify it (change version, update sources) and build the package manually.
2 Likes
pycrk
March 6, 2022, 1:02pm
3
if you can’t wait, you can install the Dotnet SDK 7.0/beta package with snap. you need to install the snap package manager for this solution.
Edit:
here is a tutorial, with instrcutions how you can install it:
replace the last command with:
sudo snap install dotnet-sdk --channel=7.0/beta --classic
pycrk
March 6, 2022, 1:21pm
4
@DRoma82 welcome to the EOS community
Thank you all for your kind replies!
@moson I don’t have much experience with Linux, so I don’t think I can change the package like that, unfortunately… =(
@pycrk I had tried installing it using snap, but I installed snap through yay, and snap was giving me this error:
error: cannot communicate with server: Post "http://localhost/v2/snaps/dotnet-sdk": dial unix /run/snapd.socket: connect: no such file or directory
I followed the guide you sent me, and now snap works! However, after insting, even though I got the following message:
dotnet-sdk (7.0/beta) 7.0.100-preview.1.22110.4 from Microsoft .NET Core (dotnetcore✓) installed
I still have only 6.0.102 installed:
[dani@endeavour-vb snapd]$ dotnet --version
6.0.102
[dani@endeavour-vb snapd]$ dotnet --list-sdks
6.0.102 [/usr/share/dotnet/sdk]
Any ideas on what might be wrong?
Thank you so much for your attention on a sunday! =)
moson
March 6, 2022, 2:28pm
6
Instructions:
git clone https://aur.archlinux.org/dotnet-core-bin.git
cd dotnet-core-bin
code PKGBUILD # I'm assuming you have vs code installed here. If not, use another editor to edit the file
Replace the contents of the file with these:
PKGBUILD_6.0.200
# Maintainer: Attila Greguss <floyd0122[at]gmail[dot]com>
pkgbase=dotnet-core-bin
pkgname=(
'dotnet-host-bin'
'aspnet-runtime-bin'
'dotnet-runtime-bin'
'dotnet-sdk-bin'
'netstandard-targeting-pack-bin'
'dotnet-targeting-pack-bin'
'aspnet-targeting-pack-bin'
)
pkgver=6.0.2.sdk200
_runtimever=6.0.2
_sdkver=6.0.200
pkgrel=1
arch=('x86_64' 'armv7h' 'aarch64')
url='https://www.microsoft.com/net/core'
license=('MIT')
options=('staticlibs')
source=('dotnet.sh')
source_armv7h=('https://download.visualstudio.microsoft.com/download/pr/4cfcfa53-f421-4257-8cd2-d4078f9ffe90/008804a5475fa0d46b9e8f03cb78bfcd/dotnet-sdk-6.0.200-linux-arm.tar.gz')
source_aarch64=('https://download.visualstudio.microsoft.com/download/pr/ad60a07c-d4f0-4225-9154-c3a2ec0f34cf/a588cd2b94db2214f6e5dcd02c4aa37a/dotnet-sdk-6.0.200-linux-arm64.tar.gz')
source_x86_64=('https://download.visualstudio.microsoft.com/download/pr/807f9d72-4940-4b1a-aa4a-8dbb0f73f5d7/cb666c22a87bf9413f29615e0ba94500/dotnet-sdk-6.0.200-linux-x64.tar.gz')
sha512sums=('e61b9e3e5a2305646a616d598378230c9755c5dd5363692cc363f8f4add3807563c324dd86f3a7ae9d358c82d730608e7b293935a2b6c81c0c0f62d752a0a1cf')
sha512sums_x86_64=('334f3ea4bfeb736bed61c5896796a09d640b0ae74605c514edc5869c395befb7cfc795b58c922f14560e7d41c89c073c62ed01eefc6d9f13aa916e3478949c24')
sha512sums_armv7h=('c2950d5da671a50c955d07997b288c02076b1d69014d3ac3f5941179e29a67b4d56fc5acbde85fe13ffd46efa95ead05b39d90dc577d2a668f637e6a9547944a')
sha512sums_aarch64=('4e2b8f65f4cd9d1e54233b377e7efef5202eee3fa5e4592131ff03ecab032bfccdc91f4e8c806064fb769c48f946634bf1e420afecd7fcd2d981d40eeec5a881')
package_dotnet-host-bin() {
pkgdesc='A generic driver for the .NET Core Command Line Interface (binary)'
provides=("dotnet-host" "dotnet-host=${_runtimever}")
depends=(
'gcc-libs'
'glibc'
)
conflicts=('dotnet-host')
install -dm 755 "${pkgdir}"/usr/{bin,lib,share/{dotnet,licenses/dotnet-host}}
cp -dr --no-preserve='ownership' dotnet host "${pkgdir}"/usr/share/dotnet/
cp -dr --no-preserve='ownership' LICENSE.txt ThirdPartyNotices.txt "${pkgdir}"/usr/share/licenses/dotnet-host
ln -sf /usr/share/dotnet/dotnet "${pkgdir}"/usr/bin/dotnet
ln -sf /usr/share/dotnet/host/fxr/"${_runtimever}"/libhostfxr.so "${pkgdir}"/usr/lib/libhostfxr.so
install -Dm 644 "${srcdir}"/dotnet.sh -t "${pkgdir}"/etc/profile.d/
}
package_dotnet-runtime-bin() {
pkgdesc='The .NET Core runtime (binary)'
depends=(
"dotnet-host>=${_runtimever}"
'gcc-libs'
'glibc'
'icu'
'libgssapi_krb5.so'
'libunwind'
'zlib'
'openssl'
)
optdepends=('lttng-ust: CoreCLR tracing')
provides=("dotnet-runtime=${_runtimever}" "dotnet-runtime-6.0")
conflicts=("dotnet-runtime=${_runtimever}" "dotnet-runtime-6.0")
install -dm 755 "${pkgdir}"/usr/share/{dotnet/shared,licenses}
cp -dr --no-preserve='ownership' shared/Microsoft.NETCore.App "${pkgdir}"/usr/share/dotnet/shared/
ln -s dotnet-host-bin "${pkgdir}"/usr/share/licenses/dotnet-runtime-bin
}
package_aspnet-runtime-bin() {
pkgdesc='The ASP.NET Core runtime (binary)'
depends=('dotnet-runtime-bin')
provides=("aspnet-runtime=${_runtimever}" "aspnet-runtime-6.0")
conflicts=("aspnet-runtime=${_runtimever}" "aspnet-runtime-6.0")
install -dm 755 "${pkgdir}"/usr/share/{dotnet/shared,licenses}
cp -dr --no-preserve='ownership' shared/Microsoft.AspNetCore.App "${pkgdir}"/usr/share/dotnet/shared/
ln -s dotnet-host-bin "${pkgdir}"/usr/share/licenses/aspnet-runtime-bin
}
package_dotnet-sdk-bin() {
pkgdesc='The .NET Core SDK (binary)'
depends=(
'glibc'
'gcc-libs'
'dotnet-runtime-bin'
'dotnet-targeting-pack-bin'
'netstandard-targeting-pack-bin')
optdepends=('aspnet-targeting-pack-bin: Build ASP.NET Core applications')
provides=("dotnet-sdk-bin" "dotnet-sdk=${pkgver}" "dotnet-sdk-6.0")
conflicts=("dotnet-sdk-bin" "dotnet-sdk=${pkgver}" "dotnet-sdk-6.0")
install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
cp -dr --no-preserve='ownership' sdk sdk-manifests templates "${pkgdir}"/usr/share/dotnet/
ln -s dotnet-host-bin "${pkgdir}"/usr/share/licenses/dotnet-sdk-bin
}
package_netstandard-targeting-pack-bin() {
pkgdesc='The .NET Standard targeting pack (binary)'
provides=('netstandard-targeting-pack-2.1' 'netstandard-targeting-pack')
conflicts=('netstandard-targeting-pack-2.1' 'netstandard-targeting-pack')
install -dm 755 "${pkgdir}"/usr/share/{dotnet,dotnet/packs,licenses}
cp -dr --no-preserve='ownership' packs/NETStandard.Library.Ref "${pkgdir}"/usr/share/dotnet/packs/
ln -s dotnet-host-bin "${pkgdir}"/usr/share/licenses/netstandard-targeting-pack
}
package_dotnet-targeting-pack-bin() {
pkgdesc='The .NET Core targeting pack (binary)'
depends=(netstandard-targeting-pack-bin)
provides=(dotnet-targeting-pack=${_runtimever} dotnet-targeting-pack-6.0)
conflicts=(dotnet-targeting-pack=${_runtimever} dotnet-targeting-pack-6.0)
if [ $CARCH = 'x86_64' ]; then msarch=x64;
elif [ $CARCH = 'armv7h' ]; then msarch=arm;
elif [ $CARCH = 'aarch64' ]; then msarch=arm64; fi
install -dm 755 "${pkgdir}"/usr/share/{dotnet,dotnet/packs,licenses}
cp -dr --no-preserve='ownership' packs/Microsoft.NETCore.App.{Host.linux-${msarch},Ref} "${pkgdir}"/usr/share/dotnet/packs/
ln -s dotnet-host-bin "${pkgdir}"/usr/share/licenses/dotnet-targeting-pack-bin
}
package_aspnet-targeting-pack-bin() {
pkgdesc='The ASP.NET Core targeting pack (binary)'
depends=(dotnet-targeting-pack-bin)
provides=(aspnet-targeting-pack=${_runtimever} aspnet-targeting-pack-6.0)
conflicts=(aspnet-targeting-pack=${_runtimever} aspnet-targeting-pack-6.0)
install -dm 755 "${pkgdir}"/usr/share/{dotnet,dotnet/packs,licenses}
cp -dr --no-preserve='ownership' packs/Microsoft.AspNetCore.App.Ref "${pkgdir}"/usr/share/dotnet/packs/
ln -s dotnet-host-bin "${pkgdir}"/usr/share/licenses/aspnet-targeting-pack-bin
}
Return to the terminal and build the package(s):
makepkg
Once finished you should have several packages in that directory.
Install what you need with pacman. E.g.:
sudo pacman -U *.zst # installs/upgrades all of them...
1 Like
pycrk
March 6, 2022, 2:46pm
7
DRoma82:
dotnet-sdk
you can try to register the beta version to another alias. at example dotnetBeta, after you run the following command, you can use the command dotnetBeta instead dotnet. you can name it as you like.
sudo snap alias dotnet-sdk.dotnet dotnetBeta
@pycrk hmmm… got it. Now I just have to find out how to make Jetbrains Rider use this different alias instead of the traditional one… Thanks for your help so far!
@moson thanks for the instructions on how to build the package. I have to run some errands right now, but I’ll try that later. Thanks!
1 Like
@moson this worked flawlessly. I was even able to understand how that worked. Thanks!
Also, thanks @pycrk for providing the snap solution. This community seems great!
=)
2 Likes
system
Closed
March 9, 2022, 1:04pm
10
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.