Debian 10にLinuxbrewをインストールしてみる
※ 当ページには【広告/PR】を含む場合があります。
2020/02/07
homebrew
homebrew
Requirements
+ GCC 4.7.0 or newer
+ Linux 2.6.32 or newer
+ Glibc 2.13 or newer
+ 64-bit x86_64 CPU
$ sudo apt-get install build-essential curl file git
#GCC
$ gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#glibc
$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Debian GLIBC 2.28-10) stable release version 2.28.
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.3.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
#LinuxカーネルとCPU
$ uname -r
4.19.0-6-amd64
エンジニアに向けたLinux入門書の決定版 新しいLinuxの教科書
linuxbrewのインストール
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
==> Installing Ruby to /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
100 26.9M 100 26.9M 0 0 1496k 0 0:00:18 0:00:18 --:--:-- 3672k
==> Installing successful
==> /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current/bin/ruby
ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-linux]
==> Add Ruby to your PATH by running:
PATH=/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current/bin:$PATH
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
...
Receiving objects: 100% (5180/5180), 4.39 MiB | 2.21 MiB/s, done.
Resolving deltas: 100% (47/47), done.
Tapped 4958 formulae (5,222 files, 13.6MB).
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Already up-to-date.
==> Installation successful!
...
Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.
パスを通す
brew
~/.profile
~/.bash_profile
.profile
.bashrc
$ sudo nano ~/.bashrc
#...中略
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
export PATH="/home/linuxbrew/.linuxbrew/share/man:$PATH"
$ brew --version
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 4: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
Homebrew 2.2.5
Homebrew/linuxbrew-core (git revision 9302; last commit 2020-02-07)
setlocale
エンジニアに向けたLinux入門書の決定版 新しいLinuxの教科書
おまけ: linuxbrewでmkcert
$ brew install mkcert
#...(中略)
==> Installing mkcert
==> Downloading https://linuxbrew.bintray.com/bottles/mkcert-1.4.1.x86_64_linux.
==> Downloading from https://akamai.bintray.com/7f/7f63bb06a04836755cbbf3bd67a31
######################################################################## 100.0%
==> Pouring mkcert-1.4.1.x86_64_linux.bottle.tar.gz
🍺 /home/linuxbrew/.linuxbrew/Cellar/mkcert/1.4.1: 7 files, 4.8MB
$ brew install nss
#...(中略)
==> Installing nss
==> Downloading https://linuxbrew.bintray.com/bottles/nss-3.49.2.x86_64_linux.bo
==> Downloading from https://akamai.bintray.com/a3/a33f0dd674e355205b99e2f625521
######################################################################## 100.0%
==> Pouring nss-3.49.2.x86_64_linux.bottle.tar.gz
🍺 /home/linuxbrew/.linuxbrew/Cellar/nss/3.49.2: 233 files, 37.9MB
$ mkcert -install
Created a new local CA at "/home/********/.local/share/mkcert" 💥
Sudo password:*************
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊
$ mkcert localhost 127.0.0.1
Using the local CA at "/home/********/.local/share/mkcert" ✨
Created a new certificate valid for the following names 📜
- "localhost"
- "127.0.0.1"
The certificate is at "./localhost+1.pem" and the key at "./localhost+1-key.pem" ✅
macOSでlinuxコマンドを利用する知識とテクニック [新版 zsh&bash対応]macOS×コマンド入門 ──ターミナルとコマンドライン
まとめ
参照サイト
記事を書いた人
ナンデモ系エンジニア
電子工作を身近に知っていただけるように、材料調達からDIYのハウツーまで気になったところをできるだけ細かく記事にしてブログ配信してます。
カテゴリー