I am following these instructions to run my .NET 6
console app on my Raspberry Pi and the last point (4.b) is causing me some troubles.
After deploying my app to the raspberry pi, I am running the following commands:
pi@babyminder:~/babyminder $ chmod +x PoC.BabyMinder.Gpio
pi@babyminder:~/babyminder $ ls -l
total 18668
-rw-r--r-- 1 pi pi 9824 Jul 19 23:09 libSystem.IO.Ports.Native.so
-rwxr-xr-x 1 pi pi 19089322 Jul 19 23:09 PoC.BabyMinder.Gpio
-rw-r--r-- 1 pi pi 10892 Jul 19 23:09 PoC.BabyMinder.Gpio.pdb
pi@babyminder:~/babyminder $ ./PoC.BabyMinder.Gpio
-bash: ./PoC.BabyMinder.Gpio: No such file or directory
Here is the content of my pubxml
file:
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\publish\linux-arm\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>
Here is the scp command I used:
scp -r bin/Release/net6.0/publish/linux-arm/* pi@babyminder:/home/pi/babyminder/
I don't understand what is going wrong with my setting?
Here are some additional information:
- I only know the very basic of unix
- My Raspberry Pi is a fresh installation of Raspberry Pi OS Lite (64 bits)
chmod 777
does not work either- If I omit the chmod command, I get the following error when I try to execute the file:
-bash: ./PoC.BabyMinder.Gpio: Permission denied
(so the file does exist) - Looks like the answer is here but I honestly do not understand everything ...
- Deploying a framework-dependent app works like a charm (previous paragraph in the first link provided)