RockyLinux/ubuntuで使っていたアプリを使いたい...
まずはプロンプトをCentOSと同じような表記にしたい...
$HOME/.zshrcに下記を追加します
export PS1="[%n@%m %~]\$ "
さてどれを選ぶか...ソースからコンパイルもいいのだが、時短のためには趣味は外した方がいい....
比較された方はたくさんいるようでhttps://apple.stackexchange.com/questions/32724/what-are-pros-and-cons-for-macports-fink-and-homebrew
ここでは Homebrew を使います
本家様に記載があるようにコマンド行一行を実行します
supervisor@mini-m1 ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Password: <--- パスワードを入力します sudo でインストールするため
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
==> The following new directories will be created:
/opt/homebrew/bin
/opt/homebrew/etc
/opt/homebrew/include
/opt/homebrew/lib
/opt/homebrew/sbin
/opt/homebrew/share
/opt/homebrew/var
/opt/homebrew/opt
/opt/homebrew/share/zsh
/opt/homebrew/share/zsh/site-functions
/opt/homebrew/var/homebrew
/opt/homebrew/var/homebrew/linked
/opt/homebrew/Cellar
/opt/homebrew/Caskroom
/opt/homebrew/Frameworks
==> The Xcode Command Line Tools will be installed.
:
:
Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode
Done with Command Line Tools for Xcode
:
:
==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/supervisor/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
https://docs.brew.sh
supervisor@mini-m1 ~ %
最後の記載にあるように「$HOME/.zprofile」にpathの追加が必要みたい. どうも「.zprofile」は初めは存在しない.
supervisor@mini-m1 ~ % echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/supervisor/.zprofile
supervisor@mini-m1 ~ % cat /Users/supervisor/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
supervisor@mini-m1 ~ %
(ちなみに)
supervisor@mini-m1 ~ % echo $(/opt/homebrew/bin/brew shellenv)
(「;」を切り取って見やすくしてます)
export HOMEBREW_PREFIX="/opt/homebrew"
export HOMEBREW_CELLAR="/opt/homebrew/Cellar"
export HOMEBREW_REPOSITORY="/opt/homebrew"
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}"
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:"
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}"
supervisor@mini-m1 ~ %
supervisor@mini-m1 ~ % which brew
/opt/homebrew/bin/brew
supervisor@mini-m1 ~ % brew install wget
brew install iproute2mac