UbuntuでGolang インストール編

環境

  • インストールした日: 2021-04-09
  • Ubuntu 20.04.2 LTS
  • Go version: 1.16.3

インストール手順

$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt update
$ apt info golang
$ sudo apt install golang
$ go version
go version go1.16.3 linux/amd64

@see https://github.com/golang/go/wiki/Ubuntu

Hello, Rust

環境情報

  • インストールした日: 2018-09-29
  • Xubuntu 18.04 LTS
  • Rust version: 1.29.1

Hello, worldまでの手順

1. Rustのインストール

  • ターミナルから以下を実行。
$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin
directory, located at:

  /home/xxxxx/.cargo/bin

This path will then be added to your PATH environment variable by modifying the
profile file located at:

  /home/xxxxx/.profile

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2018-09-25, rust version 1.29.1 (b801ae664 2018-09-20)
info: downloading component 'rustc'
 69.7 MiB /  69.7 MiB (100 %)   5.1 MiB/s ETA:   0 s                
info: downloading component 'rust-std'
 51.0 MiB /  51.0 MiB (100 %)   4.6 MiB/s ETA:   0 s                
info: downloading component 'cargo'
info: downloading component 'rust-docs'
  8.2 MiB /   8.2 MiB (100 %)   4.5 MiB/s ETA:   0 s                
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: default toolchain set to 'stable'

  stable installed - rustc 1.29.1 (b801ae664 2018-09-20)


Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done automatically.

To configure your current shell run source $HOME/.cargo/env

2. IDEEclipseをインストール

3. プロジェクトの作成と実行

  • Cargo project を作成。
  • main.rsRun しようとすると、Install missing rls component in Rustup と、言われるので rls コンポーネントをインストールします。
$ rustup component add rls-preview
  • main.rsRun したところ今度は
$ rustc main.rs
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

と、言われたので

$ sudo apt install build-essential
  • 3度目の正直で再度 main.rsRun

無事 Hello, world! と出力されました!!

参考

https://qiita.com/Morix1500/items/f4a71a037bd267ef62d7

Xubuntuをインストール後にやったこと

この記事について

Ubuntu 16.04 LTS を使ってきたが、一向に 18.04 LTS へのアップグレードが落ちてくる気配もなく、心機一転 Xubuntu 18.04 LTSクリーンインストール。その際にしたセットアップを個人の備忘録的にメモしておきます。

  • Xubuntu 18.04 LTS
  • ThinkPad T420 (ストレージを自分でSSDに換装)
  • インストール日: 2018年8月23日

※ 何かメモすることが発生したらこの記事が随時更新されていきます。

何はともあれテキストエディタ

テキストエディタVim をインストール

$ sudo apt install gedit
$ sudo apt instlal vim-gtk3

ショートカットキーの設定変更

Superキー(Windowsキー)でメニューが開くようにショートカットキーを変更 こちらのサイトを参照しなが設定しました。

Xubuntu 入れたらやることリスト:個人的初期設定とインストールしたおすすめアプリ | mogi2fruitsどっとねっと

SSHの鍵の作成

自分の記事見て作成

ダウンロード/インストールしたソフトウェア

rbenvやrvmでRubyのインストールが出来ない場合の対処

環境

対処方法 => dtrace を無効化してインストールする

rbenv での例

RUBY_CONFIGURE_OPTS="--disable-dtrace" rbenv install 2.4.3

rvm での例

rvm install --disable-dtrace ruby-2.4.3

@ see

https://github.com/rbenv/ruby-build/issues/1061

https://github.com/rvm/rvm/issues/4319

How to build OpenCV for Java on Mac

環境

前提条件

  • Javaがインストールされていて環境変数 JAVA_HOME が設定されていること
  • Antがインストールされていて PATH が通っていること
$ git clone git://github.com/opencv/opencv.git
$ cd opencv/
$ git checkout refs/tags/3.4.0
$ mkdir build
$ cd build
$ cmake -DBUILD_SHARED_LIBS=OFF ..
$ make -j8

at see Introduction to Java Development