linux:gentoo-prefix
Install Gentoo Prefix on MacBook Pro
已经成功将Gentoo Prefix安装到MacBook Pro,将注意的地方记录如下
1.需要Xcode支持,之前需要安装好Xcode,同时在Xcode中把command line tools安装好
Xcode->preference-Downloads->Components->Command Line Tools
2.全程参考官方文档 http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml
3.在编译过程中遇到找不到vers_string命令,经查原来是一个shell脚本,只要下载它,然后安装到系统中即可
wget http://opensource.apple.com/source/bootstrap_cmds/bootstrap_cmds-79/vers_string.sh sudo install -c -o root -g wheel vers_string.sh /usr/bin/vers_string
4.安装完后配置make.conf
Pengs-MacBook-Pro:Gentoo pjq$ cat etc/make.conf
USE="unicode nls" CFLAGS="-O9 -pipe -march=nocona" CXXFLAGS="${CFLAGS}" SYNC="rsync://rsync.gentoo.org/gentoo-portage rsync://ftp.jaist.ac.jp/pub/Linux/Gentoo/ rsync://mirrors.xmu.edu.cn/gentoo/" GENTOO_MIRRORS="http://mirrors.163.com/gentoo/"其中-march=nocona,之前设置成其它地几个都不行,比如说native,后来设置成这个才得以成功:
emerge -e system
5.调用bookstrap-prefix.sh时失败
调用过程如下:
export EPREFIX=/Users/pjq/Gentoo cd $EPREFIX/usr/portage/scripts ./bootstrap-prefix.sh $EPREFIX startscript
后来通过查看bootstrap-prefix.sh:
429 if ! emerge -u ${theshell} ; then 430 eerror "Your shell is not available in portage, hence we ca nnot automate starting your prefix" > /dev/stderr 431 # exit -1
在这里我手动把exit -1给注释掉,感觉这是一个BUG,之后再跑脚本就正常了:
sudo cp startprefix /usr/local/bin/ chmod +x /usr/local/bin/startprefix ./startprefix
/var/www/dokuwiki/wiki/data/pages/linux/gentoo-prefix.txt · Last modified: 2016/05/05 13:07 by 127.0.0.1