群晖安装ipkg和gcc编译器

下载gcc脚本

首先我们要运行终端,下载运行脚本:

#x86_64
wget http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-x86_64-bootstrap.sh
#i686
http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-i686-bootstrap.sh

其他版本的环境脚本可以在 Index of /optware-ng/bootstrap/ (nslu2-linux.org)下载

我们使用x86_64版本buildroot-x86_64-bootstrap.sh

#!/bin/sh
feed=http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64
ipk_name=$(wget -qO- $feed/Packages | awk '/^Filename: ipkg-static/ {print $2}')
wget -O /tmp/$ipk_name $feed/$ipk_name
tar -C /tmp -xvzf /tmp/$ipk_name ./data.tar.gz
tar -C / -xzvf /tmp/data.tar.gz
rm -f /tmp/$ipk_name /tmp/data.tar.gz
echo "src/gz optware-ng $feed" > /opt/etc/ipkg.conf
echo "dest /opt/ /" >> /opt/etc/ipkg.conf

PATH=$PATH:/opt/bin:/opt/sbin

echo "Bootstraping done"

echo "Installing glibc-locale package to generate needed /opt/lib/locale/locale-archive"
echo "================================================================================="

/opt/bin/ipkg update
/opt/bin/ipkg install glibc-locale

echo "================================================================================="
echo "Removing glibc-locale package to save space: this doesn't remove generated /opt/lib/locale/locale-archive"

/opt/bin/ipkg remove glibc-locale

i686版本buildroot-i686-bootstrap.sh

#!/bin/sh
feed=http://ipkg.nslu2-linux.org/optware-ng/buildroot-i686
ipk_name=$(wget -qO- $feed/Packages | awk '/^Filename: ipkg-static/ {print $2}')
wget -O /tmp/$ipk_name $feed/$ipk_name
tar -C /tmp -xvzf /tmp/$ipk_name ./data.tar.gz
tar -C / -xzvf /tmp/data.tar.gz
rm -f /tmp/$ipk_name /tmp/data.tar.gz
echo "src/gz optware-ng $feed" > /opt/etc/ipkg.conf
echo "dest /opt/ /" >> /opt/etc/ipkg.conf

PATH=$PATH:/opt/bin:/opt/sbin

echo "Bootstraping done"

echo "Installing glibc-locale package to generate needed /opt/lib/locale/locale-archive"
echo "================================================================================="

/opt/bin/ipkg update
/opt/bin/ipkg install glibc-locale

echo "================================================================================="
echo "Removing glibc-locale package to save space: this doesn't remove generated /opt/lib/locale/locale-archive"

/opt/bin/ipkg remove glibc-locale

安装gcc脚本

切换到root用户sudo -i,输入当前用户密码。

在文件buildroot-x86_64-bootstrap.sh下载目录下执行chmod +x buildroot-x86_64-bootstrap.sh && ./buildroot-x86_64-bootstrap.sh等待安装完成。

继续执行命令 /opt/bin/ipkg update && /opt/bin/ipkg install gcc 

即可安装。

今后我们也可以通过ipkg命令安装一些群晖支持的程序环境了。

© 版权声明
THE END
喜欢就支持一下吧
点赞1 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片