-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspbian support #447
Comments
As an addendum, when I run dotnet.bootstrap.py as outlined here, this is the result:
|
This would be very, very nice! .NET core is already a great piece of software, being able to use it on my Raspberry Pi(s) would be even greater. Raspbian is a much more natural and popular choice there, so adding support for it should be considered. |
So far, we've only built in on Ubuntu and it worked great on a Raspberry Pi. I expect we will shortly be able to have something that will work on Raspian too. |
I compiled it on my Raspberry Pi, but there were some things I did differently:
When I run Does anyone have an idea of what I did wrong? |
We're going to be changing some things such that we build linux binaries for ARM that will work on many different distros. That will address this. |
Does anyone know if this could work in a dockerised ubuntu on raspbian? Build the container, send to dockerhub, cuts down drastically on the commands needed to run. |
I just wanted to add that there are 11+ million raspberry pi's sold. Most of which will be running Raspbian. I'd also like to see dotnet core support aarch64 (suse, debian stretch) on the raspberry pi 3+ |
@Petermarcu on documentation, it says Ubuntu 16.04 is supported. Is this the Ubuntu Core or Ubuntu MATE? |
@kmleow it should work on either. |
I've been following the guide here https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md with .net core 2.0.0-beta-001834-00 i published the app, but it does not generate an executable with the name of the project, the folder contains instead an "apphost" elf. When i run it it says : |
@valeriob - can you confirm what info you get on the development machine when you run Can you also share the contents of your project? |
Thanks @Petermarcu you nailed it !! 💃 |
If you get the latest 2.0 sdk as a zip, extract it somewhere and call that version of dotnet for your commands, do you get a different result. That will make sure you are getting the 2.0 sdk. |
Any update on when .NET Core and ASP.NET Core will be available on Raspbian? |
It should work. Go ahead and try the instructions at https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md and let us know if you hit any problems. |
Thank you, the instructions say Linux, and not Raspbian (specifically), which is why I wanted to make sure, given that the thread above hints that it may not run on Raspbian. |
Where exactly do we need to go to get a working dotnet runtime binary? Or do we need to build it ourselves? |
I think that's the current status. @Petermarcu, is there any chance Raspbian could get added eventually as an official target with prebuilt packages? |
I followed the instructions and got it working with Raspbian. I think Raspbian is preferred over Ubuntu, because Ubuntu has a major bug with respect to the Raspberry Pi 3: |
@Tealons If I may ask, how did you accomplish this? Coreclr fails to build on my Raspberry Pi 3 when I try to build dotnet on it. |
Like mentioned in the instructions I'm publishing on a Windows machine with linux-arm as the target. The resulting files are copied to the Raspberry Pi: https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md |
I see. The application that I want to run on my Pi requires the dotnet runtime, so unfortunately, that is not an option for me. |
From what I understand the runtime is included in the app when you publish it. Or do you need the cli available for your application? |
It's not my application, and as far as I'm aware, there is no version that is built for the Pi, specifically. |
@Tealons It works fine with a console application, but not mvc application as dotnet publish failed. |
I followed it, but getting a /cc @Petermarcu |
Raspberry Pi Zero doesn't work because it doesn't support armv7 instructions that .net core depends on. It should work on a raspberry pi. |
thanks @Petermarcu - is this a dependency that will alsways be there or would there be a solution/workaround that would allow us to run on pi zero? |
We don't currently have plans to remove the armv7 dependency and it's not really something that can be worked around. At some point we may decide to do that and/or would welcome a community effort to make it work. |
I apologize for being a little bit dense about this, but is there currently a way to run .NET Core and ASP.NET Core apps on Raspbian. I see instructions and help about how to run apps for those platforms on the Raspberry Pi, but they all involve using non-Raspbian OSes. |
As I understand it, you can build your app on a different machine such that it runs on Raspbian; it is self-contained. There is currently no SDK or runtime for Raspbian. |
That is correct. You can use the .NET Core 2.0 SDK to build the app, copy it over to your Pi and run it. |
Technically, you can probably copy the SDK over to the Pi and see if it works. There is a decent chance but its not tested there and its performance is not ideal for development on the Pi. |
Thanks @TVoc @Petermarcu I am fine building the app elsewhere, and not interested in developing on the Pi. I guess I will wait until the Pi has runtime(s) for the Raspbian OS. Thank you. |
What do you mean wait until Pi has runtime(s) for the Raspbian OS? If you follow the instructions here: https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md the output should run on Raspbian. |
Manual for an MVC application:
Tada! A working MVC application on your raspberry pi! |
Sigh! Perhaps I am missing the trick. I go over to the page you indicated. It tells me how I should build my app, how to change the .csproj, and publish my app to a folder. Then there is a section on Getting the app to run on the Pi. The first step is to install Linux. Let's say I do that as well and install Raspbian. The next step says to install prereq packages. I click on that link, and there is no section for Raspbian. Which makes me wonder if the Linux I had to install in the first step was Ubuntu? What am I missing? |
I think I remember installing all of the packages listed under Ubuntu on Raspbian. I suspect it should work if you did that as well and tried to run your app. |
@shripathi-kamath , you are right. That doc should be updated to be more clear. @TVoc is correct that the Ubuntu instructions should just work. That said, that list there is focused on what you need to do development. If you look here you will see the list of runtime dependencies we have for Debian Jessie which I assume will be much closer to Raspbian. |
@TVoc Yeah, forgot about that. I did that as the first step in trying to get it working on the raspberry pi. I used the following command: |
OK @Petermarcu, that clears it up. Thanks again to @TVoc. |
For others, this would be the command for the runtime dependencies:
|
@Petermarcu Funny, seems like de dependencies changed over time? |
@Tealons not really, I dont think we've done a good job documenting the runtime dependencies. This list is also very explicit and many of those things are pulled in transitively by others. BTW, I missed your comment about making a PR to add ASP.NET scenarios to the how to doc. Go ahead. Just put it in a section at the end so the hello world example still flows and then people can add onto it with ASP.NET. |
Not that anyone asked, but after I added the above-mentioned prerequisites for Raspbian, I successfully built, deployed and executed a sample application on the Pi. Thank you |
Are you planning to create docker images for Raspbian? |
@TFTomSun, I believe it's being looked into. |
If anyone is still hitting problems getting a C# app deployed and working on Raspbian, I wrote a post about my experiences, and how I managed it - https://jeremylindsayni.wordpress.com/2017/07/23/running-a-net-core-2-app-on-raspbian-jessie-and-deploying-to-the-pi-with-cake/ Hopefully this'll help any folks still trying to get running on Raspbian. |
I'm going to close this issue now because as far as I know, everything is working on Raspbian for .NET Core 2.0. If there are specific issues, we should open a new issue to track them. Thanks to all who contributed to this issue and helped get things moving! |
Hi guys, would it be possible to run a dotnet core app inside a docker container on a Raspberry Pi Zero? |
no, it won't @LeonidasFettikus . The CPU (ARMv6) does not have instructions .NET needs. |
I thought so. Just wanted a confirmation before I abandoned/committed to the idea. |
I am waiting for a working build of dotnet for the Raspberry Pi. Currently, this page links to builds targeted to Ubuntu, but my Raspberry Pi is running Raspbian and installing Ubuntu specifically for this would be a major inconvenience. I would therefore like to know if there are plans to support Raspbian in the future.
The text was updated successfully, but these errors were encountered: