Page 1 of 3

Installing CMX v4

Posted: Mon 08 Apr 2024 12:26 pm
by Nottub
Sorry to be a pain (again).

Finally taken the plunge to install CMX V4 on my Rpi.

I currently have an SSD connected to the Rpi with all the V4 files copied across, the Data folder converted from V3 to V4 with no issues.
Note I am using the GUI and the Command line.

However I'm stuck at the 'Install' bit.

I have used the command:

Code: Select all

sudo dotnet CumulusMX.dll -install -user pi2
I've tried running it in the CumulusMX directory, and in the root (pi2) directory.

On both occasions I'm presented with:

Code: Select all

sudo: dotnet :command not found
When I run 'dotnet --info I get':

Code: Select all

.NET SDK:
 Version:           8.0.203
 Commit:            5e1ceea679
 Workload version:  8.0.200-manifests.4e94be9c

Runtime Environment:
 OS Name:     debian
 OS Version:  12
 OS Platform: Linux
 RID:         linux-arm64
 Base Path:   /home/pi2/.dotnet/sdk/8.0.203/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.3
  Architecture: arm64
  Commit:       9f4b1f5d66

.NET SDKs installed:
  8.0.203 [/home/pi2/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.3 [/home/pi2/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.3 [/home/pi2/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
I know it's probably something simple but for the moment I'm stuck.

Any help gratefully received.

Martyn

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 12:38 pm
by freddie
What does

Code: Select all

sudo dotnet --info
give you? It's almost as if dotnet isn't on root's path - but that would be very odd!

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 12:41 pm
by Nottub
Hi Freddie:

'Sudo dotnet --info'=

Code: Select all

sudo: dotnet: command not found
'Whereis dotnet'=

Code: Select all

dotnet: /usr/bin/dotnet /usr/share/dotnet /home/pi2/.dotnet/dotnet
Thanks

Martyn

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 12:45 pm
by ConligWX
this sounds like your dotnet executable is not included in your system's PATH environment variable.

This means that while you can run the dotnet --info from your cli, it might not be accessible from certain directories. To fix this, add the directory containing the dotnet executable to be in your PATH environment.

Code: Select all

export PATH=$PATH:/pathto/your/dotnet
that should fix it.

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 12:52 pm
by Nottub
Thanks Simon
this sounds like your dotnet executable is not included in your system's PATH environment variable.

This means that while you can run the dotnet --info from your cli, it might not be accessible from certain directories. To fix this, add the directory containing the dotnet executable to be in your PATH environment.
CODE: SELECT ALL

Code: Select all

export PATH=$PATH:/pathto/your/dotnet
that should fix it.
Simon, with great respect could you spell out exactly what I need to put in the code, from your example I have no idea what it means, or what to change.

Apologies but I'm not that technical. It's taken me some time to get to this stage.

Martyn

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 1:23 pm
by Nottub
Exploring this a little further and in response Simon.

I think my dotnet executable sits here (in a hidden folder called '.dotnet' - i'm using the gui to look at the file structure):

Code: Select all

/home/pi2/.dotnet/
See attachment.

So does this mean that I need to run this code or add it somewhere?

Does this look right?

Code: Select all

export PATH=$PATH:/home/pi2/.dotnet/
If so what is this bit of code actually doing (just so I can understand it as I'm a little / very confused).

Martyn

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 1:45 pm
by ConligWX
Nottub wrote: Mon 08 Apr 2024 1:23 pm
Does this look right?

Code: Select all

export PATH=$PATH:/home/pi2/.dotnet/
If so what is this bit of code actually doing (just so I can understand it as I'm a little / very confused).

Martyn
it adds the path to the linux environment. so when you are in any folder, you can call that command, and linux knows exactly where "dotnet" is and
does not fail with the "dotnet :command not found" response.

some installations of various apps add the path on install, others dont.

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 1:50 pm
by Nottub
Simon does that amended code look right for my dotnet exe file location?

Thanks
Martyn

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 1:52 pm
by ConligWX
yes. thats where your dontnet executable is by the image you have shown.

I'm no linux guru, but have had to do this in the past with some applications. my ubuntu Intel NUC is totally headless, no GUI or even a monitor, or keyboard/usb mouse lol. everthing is done in putty cli from a local windows pc or remote vpn.

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 2:38 pm
by Nottub
Not getting very far I'm afraid.

Running

Code: Select all

whereis dotnet
I get this=

Code: Select all

dotnet: /usr/bin/dotnet /usr/share/dotnet /home/pi2/.dotnet/dotnet
So there are three locations, the Bin doesn't have anything meaningful in it so I moved on to the /usr/share/dotnet folder which does have an executable dotnet file in it.

So I've tried these two instructions and you can see the result:

Code: Select all

export PATH=$PATH:/usr/share/dotnet/
sudo dotnet CumulusMX.dll -install -user pi2
sudo: [b]dotnet: command not found[/b]

Then, just in case I needed the full path:

Code: Select all

export PATH=$PATH:/usr/share/dotnet/dotnet
udo dotnet CumulusMX.dll -install -user pi2
sudo: [b]dotnet: command not found[/b]
I've tried the '/home/pi2/.dotnet/' and the '/home/pi2/.dotnet/dotnet' variant with exactly the same results.

Code: Select all

sudo: [b]dotnet: command not found[/b]
So for the moment I've not progressed!

Thanks for your help so far though.

Martyn

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 2:56 pm
by AndyKF650
I see that you are having issues with dotnet on linux. The istallation that has worked for me is contained in the following code notes. All the insrtuctions are done in a terminal session at a top level. I hope this helps.

Code: Select all

To update the dotnet installation.

First remove any existing .NET install:

	sudo rm -r /usr/share/dotnet

The following only needs to be done once at the initial install

Install the .NET dependencies  for Debian 12 bookworm

	sudo apt update
	sudo apt install libc6 libgcc-s1 libgssapi-krb5-2 libicu67 libssl1.1 libstdc++6 zlib1g

The install method installs the latest version, SDKs not needed or installed

	wget https://dot.net/v1/dotnet-install.sh
	chmod +x dotnet-install.sh
	sudo ./dotnet-install.sh -c LTS --install-dir /usr/share/dotnet --runtime dotnet

Then next do the following

	sudo echo 'export PATH=$PATH:/usr/share/dotnet' | sudo tee /etc/profile.d/dotnet.sh > /dev/null
	sudo chmod +x /etc/profile.d/dotnet.sh
	sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet

To test the install the following will show the version and other information

	dotnet --info


A final test from the terminal @CumulusMX will prove the installation.

	dotnet utils/bin/cumulusutils.dll website

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 3:19 pm
by Nottub
What I have found is that the

Code: Select all

/usr/bin/dotnet
Has a red exclamation mark in it (not sure if thats normal or not). :?:

What is noticeable is the target file in 'File properties' is wrong. The link points to:

Code: Select all

/home/pi/.dotnet/dotnet
When the pi is actually called pi2:

Operator error I think :bash:

So presumably should read

Code: Select all

/home/pi2/.dotnet/dotnet
Could this be the issue?

If so can I rename the existing file to dotnetold with=

Code: Select all

mv usr/bin/dotnet usr/bin/dotnetold

And re-create with:

Code: Select all

sudo ln -s /home/pi2/.dotnet/dotnet /usr/bin/dotnet
Don't suppose I can edit the link can i?

Which is the best way to proceed?

Martyn

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 3:54 pm
by HansR
Personally I would remove any dotnet installation you have and install anew with the official instruction as given by Mark.

To do so, open a terminal window in the GUI (the black screen which give you the command line) and do it all from there.
The final test for the dotnet command shows you if it all worked.

And don't be afraid, if it goes wrong, delete the dotnet directory and start again :)

Re: Installing CMX v4

Posted: Mon 08 Apr 2024 4:14 pm
by Nottub
So partial success. I renamed the '/usr/bin/dotnet' to '/usr/bin/dotnetold'.

And recreated the dotnet file in the /usr/bin/ which now has the correct pi2 link.
The installation seemed to go OK, however.

So now I'm face with this:

Code: Select all

× cumulusmx.service - CumulusMX service
     Loaded: loaded (/etc/systemd/system/cumulusmx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Mon 2024-04-08 17:03:55 BST; 12s ago
   Duration: 2ms
       Docs: https://cumuluswiki.org/a/Main_Page
             https://cumulus.hosiene.co.uk/
    Process: 2710 ExecStart=/home/pi2/.dotnet/dotnet CumulusMX.dll -service (code=exited, status=217/USER)
   Main PID: 2710 (code=exited, status=217/USER)
        CPU: 0

Apr 08 17:03:55 blackberrypi systemd[1]: Started cumulusmx.service - CumulusMX service.
Apr 08 17:03:55 blackberrypi systemd[1]: cumulusmx.service: Main process exited, code=exited, status=217/US>
Apr 08 17:03:55 blackberrypi systemd[1]: cumulusmx.service: Failed with result 'exit-code'.
Going to walk away now as been at this for some time. Hey ho onto the next issue.
Nothing I do is ever easy.

SUCCESS :clap:

Going to retire to a dark room now.

Thanks all of you for putting up with my incompetence. And yes most, if not all of that incompetence was down to me. :groan:

Martyn

Re: Installing CMX v4

Posted: Mon 15 Apr 2024 4:41 pm
by RogerH
When using CMX4 with dotnet why do you need to start with

Code: Select all

sudo dotnet CumulusMX.[i]dll[/i]
rather than

Code: Select all

sudo mono CumulusMX.[i]exe[/i]
?

I have got CumulusMX running using as a service using

Code: Select all

systemctl enable cumulusmx 
but it only runs for a few seconds and then stops. What am I doing wrong?

RogerH