5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

さくらサーバーにHomebrewを導入する

Last updated at Posted at 2019-05-12
シリーズ:さくらサーバーで遊ぶ
設定等のメモ http://qiita.com/cielavenir/items/67a7c631713b4c816b6d
SSL化 http://qiita.com/cielavenir/items/aad29b2348fc4d3f9155
(さくらサーバー導入の主目的)
メールをフックする
http://qiita.com/cielavenir/items/5ce4568fc405329d421a
Linuxbrewを導入する(旧) http://qiita.com/cielavenir/items/741921fcecb281555f77
Homebrewを導入する https://qiita.com/cielavenir/items/67ce0ec9cd8d43ed00f1
さくらサーバーでgccへの依存が発生しない理由
(HOMEBREW_BUILD_FROM_SOURCE=1は不要)
https://qiita.com/cielavenir/items/410ded536d9b520989c4

方法の概略は以前説明していますが、自動化が不完全なのと、ベースが古くなったのと。

  • add these in .profile
export LD_LIBRARY_PATH=$HOME/.linuxbrew/lib
export GIT_EXECUTABLE=/usr/local/bin/git
export HOMEBREW_MAKE=/usr/local/bin/gmake
export HOMEBREW_NO_ENV_FILTERING=1
export HOMEBREW_TEMP=$HOME/tmp
  • initial
mkdir -p $HOME/tmp
wget https://raw.githubusercontent.com/Linuxbrew/install/master/install
sed -i.bak '-es/\/bin\/chown/\/usr\/sbin\/chown/' '-es/\/bin\/chgrp/\/usr\/bin\/chgrp/' install
rm install.bak
yes | ruby install
rm install

git -C $HOME/.linuxbrew/Homebrew remote add ciel https://github.com/cielavenir/brew
git -C $HOME/.linuxbrew/Homebrew fetch ciel
git -C $HOME/.linuxbrew/Homebrew checkout ciel/sakura # sakura is 2.1.2+patch
brew update --force

ln -s /usr/lib/libc.so $HOME/.linuxbrew/lib/libdl.so
ln -s $HOME/.linuxbrew/bin/patch $HOME/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/patch
ln -s $HOME/.linuxbrew/bin/m4 $HOME/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/m4
ln -s $HOME/.linuxbrew/bin/bison $HOME/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/bison
brew install gpatch
brew install m4
brew install bison

brew tap cielavenir/ciel
brew install $HOME/.linuxbrew/Homebrew/Library/Taps/cielavenir/homebrew-ciel/sakura/libiconv.rb
brew install $HOME/.linuxbrew/Homebrew/Library/Taps/cielavenir/homebrew-ciel/sakura/autoconf.rb
brew install automake
brew install pkg-config
brew install libtool

190807追記

export HOMEBREW_BUILD_FROM_SOURCE=1 は2.0以降では不要でした

220824追記

当方が使っているさくらサーバーがFreeBSD 13に移行しました。

  • gccが/usr/local/bin/gccに移動したらしく、gccのパスを検出できなくなっていたので修正しました(sakuraブランチを再pullしてください)
  • /usr/local/lib/gcc9/libstdc++.so.6にLD_LIBRARY_PATHを通す必要がありました
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?