Help us understand the problem. What is going on with this article?

らずぱいで .NET (mono)

More than 3 years have passed since last update.

概要

  • .NET Core 1.0がリリース記念?
  • らずぱいで、いつつかえるようになるかわからんので、monoを使ってみる。
  • Installing Mono and ASP.NET on a Raspberry Pi を参考に、Hello World表示を
  • ポイント: そのまま sudo apt-get mono-completeやってしまうと、古いやつがインストールされてしまう

環境

  • Raspberry Pi 3
  • 2016-05-27-raspbian-jessie.img

手順

  1. sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get install -y htop byobu
    ... いつもの
  2. Monoインストール

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install mono-complete
    mono --version
    
    monoバージョンチェック
    pi@raspberrypi:~ $ mono --version
    Mono JIT compiler version 4.4.1 (Nightly 4.4.1.0/4747417 Wed Jun 22 11:38:12 UTC 2016)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       normal
    Notifications: epoll
    Architecture:  armel,vfp+hard
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen
    pi@raspberrypi:~ $ 
    
  3. Hello World

    • vi hello.cs

      hello.cs
      using System;
      
      public class HelloWorld
      {
          static public void Main ()
          {
              Console.WriteLine ("Hello World!");
          }
      }
      
    • ビルド・実行

      #コンパイル.
      mcs hello.cs
      #実行.
      mono hello.exe
      
    • 実行例

      pi@raspberrypi:~ $ mcs hello.cs
      pi@raspberrypi:~ $ mono hello.exe
      Hello World!
      pi@raspberrypi:~ $ 
      

その他

  • らずぱいでつくった、hello.exeは、Windowsでも、実行できました。
mt08
ツイッターアカウントと紐づけてみた。[2019-11-26]
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした