如何在Debian上使用Homebrew
Docker初学者的备忘录。如果有任何错误或改进建议,请告诉我,将不胜感激。
公式文件的方法无法适用
使用“替代安装(Alternative Installation)”公式文档成功解决了问题。
安装了aptitude后,请注意还需对aptitude执行aptitude update,以便安装最新的软件包。
apt-get update && apt-get install -y aptitude
aptitude update && aptitude install -y build-essential curl file git
git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew
mkdir ~/.linuxbrew/bin
ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin
eval $(~/.linuxbrew/bin/brew shellenv)
aptitude update
brew update
当出现以下语言的警告时
line 4: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
安装locales,并进行语言设置。
aptitude update && aptitude install -y locales
localedef -f UTF-8 -i en_US en_US
# 日本語を使っている人は下記
# localedef -f UTF-8 -i ja_JP ja_JP
尝试将其转化为Dockerfile
FROM debian:buster
RUN apt-get update && apt-get install -y aptitude
RUN apt-get update
RUN aptitude update && aptitude install -y build-essential curl file git
RUN aptitude update
# brewをinstall
RUN git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew
RUN mkdir ~/.linuxbrew/bin
RUN ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin
RUN eval $(~/.linuxbrew/bin/brew shellenv)
# 言語対応
RUN aptitude update && aptitude install -y locales
RUN localedef -f UTF-8 -i en_US en_US
请参考
Linux上的Homebrew — Homebrew文档
无法更改区域设置 – ARCHIVESDRIVE HB