Aerion / uptobox-dl

An Uptobox/Uptostream batch downloader.
MIT License
52 stars 11 forks source link

DotNet install problem? #3

Closed papiche closed 3 years ago

papiche commented 3 years ago

Tryed to install with https://dot.net/v1/dotnet-install.sh

./install.sh 
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Downloading primary link https://download.visualstudio.microsoft.com/download/pr/4a7f1f6c-6777-42c4-9793-581bba4b632e/e03e6237a8f49f60014d459f0f758923/aspnetcore-runtime-5.0.6-linux-x64.tar.gz
dotnet-install: Extracting zip from https://download.visualstudio.microsoft.com/download/pr/4a7f1f6c-6777-42c4-9793-581bba4b632e/e03e6237a8f49f60014d459f0f758923/aspnetcore-runtime-5.0.6-linux-x64.tar.gz
dotnet-install: Adding to current process PATH: `/home/papiche/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

Added /home/papiche/.dotnet to PATH. But got compilation error... So I downloaded https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-3.1.15-linux-x64-binaries then manual install $ DOTNET_FILE=aspnetcore-runtime-3.1.15-linux-x64.tar.gz $ export DOTNET_ROOT=/home/papiche/.dotnet/ $ mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT" $ export PATH=$PATH:$DOTNET_ROOT

$ dotnet publish uptobox-dl/uptobox-dl.csproj -c Release -r linux-x64
Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
  * You intended to execute a .NET program:
      The application 'publish' does not exist.
  * You intended to execute a .NET SDK command:
      It was not possible to find any installed .NET SDKs.
      Install a .NET SDK from:
        https://aka.ms/dotnet-download

I wil try install on RaspberryPi (arm32)

Are you sure you need dotnet library on linux?

Aerion commented 3 years ago

Hi,

This issue is not really related to uptobox-dl, but how to build/run a dotnet project.

To simplify, in your cases there are two steps:

For your second trial, you have the runtime of .NET on your machine, so if you were to have the binaries, you could run it!

To make it easier for everyone, I added the build of linux arm32 and arm64 platforms in github actions.

I followed the steps described here to install dotnet runtime on a raspberry pi. Running dotnet --info has a correct output.

At this point, simply download the artifact for your platform (arm), extract it, and you can run it!

curl -LO https://github.com/Aerion/uptobox-dl/releases/download/v1.0.1/uptobox-dl-v1.0.1-linux-arm.tar.gz
tar xvf uptobox-dl-v1.0.1-linux-arm.tar.gz
./uptobox-dl-v1.0.1-linux-arm/uptobox-dl --help

After performing the above steps, I have the correct output on my raspberry pi.

uptobox-dl 1.0.0
Copyright (C) 2021 uptobox-dl

  -v, --verbose    Set output to verbose messages.
...

Let me know if it's clearer like that :)

papiche commented 3 years ago

Thank you, dotnet was installed in ~/.dotnet

sudo ln -s ~/.dotnet/dotnet /usr/bin/dotnet

then using binaries works

I still wonder why DOTNET is a mandatory requirement for Linux platform? I am not a great fan of M$, which strategy is obviously to invade Free Software !!

Aerion commented 3 years ago

Let's close this issue as it's solved :)

I still wonder why DOTNET is a mandatory requirement for Linux platform?

It's just that this project was written in c#, targeting .NET. So it's the same as needing java for running java project.

I am not a great fan of M$

I respect your opinion, I find it amusing that they are also the owner of Github.