黑/群晖DSM6.1.7安装gcc环境,黑/群晖DSM6.1.7安装make环境。
由于证书过期问题,在添加三方套件前需要先处理下证书。打开控制面板SSH权限,通过Shell工具登录并执行下面命令
sudo mv /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.bak && sudo curl -Lko /etc/ssl/certs/ca-certificates.crt https://curl.se/ca/cacert.pem
说明:备份根证书,下载一个证书替换
等处理完环境恢复一下即可。
//Cphub
https://www.cphub.net
//synocommunity社区
https://packages.synocommunity.com
//云梦
https://spk.520810.xyz:666
//4sag
https://spk.4sag.ru/
上面添加完套件地址后【关闭套件中心,重新打开】
在社群目录找到【Easy Bootstrap Installer】,注意必须点社群分类再手动找,搜索可能找不到。
shell工具登录群晖,然后编辑配置
vi /etc/profile
//文件末尾添加以下内容
export PATH="$PATH:/opt/bin"
保存文件后刷新环境变量
sudo source /etc/profile
然后就可以使用ipkg
命令拉
admin@MASTER:/$ ipkg -v
opkg version 0.2.4
admin@MASTER:/$
root@MASTER:/opt/bin# ipkg install gcc
Installing gcc (7.2.0-7) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/gcc_7.2.0-7_x86_64.ipk.
Installing binutils (2.29-1) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/binutils_2.29-1_x86_64.ipk.
Installing libc-dev (2.25-3) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/libc-dev_2.25-3_x86_64.ipk.
Installing libstdc++ (6.0.24-2) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/libstdc++_6.0.24-2_x86_64.ipk.
Installing libgmp (6.1.2-1) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/libgmp_6.1.2-1_x86_64.ipk.
Installing libmpfr (3.1.3-1) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/libmpfr_3.1.3-1_x86_64.ipk.
Installing libmpc (1.0.2-1) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/libmpc_1.0.2-1_x86_64.ipk.
Installing zlib (1.2.11-2) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/zlib_1.2.11-2_x86_64.ipk.
Configuring binutils.
update-alternatives: Linking //opt/bin/strings to /opt/bin/binutils-strings
Configuring libstdc++.
Configuring libgmp.
Configuring libmpfr.
Configuring libmpc.
Configuring libc-dev.
Configuring zlib.
Configuring gcc.
root@MASTER:/opt/bin# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/volume1/@optware/bin/../libexec/gcc/x86_64-buildroot-linux-gnu/7.2.0/lto-wrapper
Target: x86_64-buildroot-linux-gnu
Configured with: ../gcc-7.2.0/configure --build=x86_64-pc-linux-gnu --host=x86_64-buildroot-linux-gnu --target=x86_64-buildroot-linux-gnu --prefix=/opt --disable-nls --disable-static --with-as=/opt/bin/as --with-ld=/opt/bin/ld --enable-languages=c,c++,go --disable-multilib --disable-werror --with-gxx-include-dir=/opt/include/c++/7.2.0 --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --enable-libquadmath --enable-tls --disable-libmudflap --enable-threads --without-isl --without-cloog --disable-decimal-float --with-arch=nocona --enable-shared --disable-libgomp --with-gmp=/home/jenkins/Optware-ng/buildroot-x86_64/staging/opt --with-mpfr=/home/jenkins/Optware-ng/buildroot-x86_64/staging/opt --with-mpc=/home/jenkins/Optware-ng/buildroot-x86_64/staging/opt --with-system-zlib
Thread model: posix
gcc version 7.2.0 (GCC)
root@MASTER:/opt/bin# ipkg install make
Installing make (4.1-2) on /opt/.
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/make_4.1-2_x86_64.ipk.
Configuring make.
root@MASTER:/opt/bin# make -v
GNU Make 4.1
Built for x86_64-buildroot-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
至此群晖DSM6 安装 gcc / make环境完毕。
安装完毕后可恢复根证书【可选】
sudo cp /etc/ssl/certs/ca-certificates.crt.bak /etc/ssl/certs/ca-certificates.crt
http://blog.xqlee.com/article/2412191454592115.html