• 那是云首页
  • 快捷导航
  • 更多
    设为首页收藏本站
  • |
花生壳

群晖6.21安装apt包管理器

群晖 Synology  / 教程分享  / 只看大图  / 倒序浏览   © 著作权归作者本人所有

0

精华

32

回帖

312

积分

入门用户

Rank: 1

云币
1
贡献
20
活跃
196
精华
0
Ocean428 发表于 2020-2-5 17:07 来自 中国
谢谢楼主分析  分享   学习学习!!!!!     

点评

之前的有bug,会导致一些系统命令无法运行 套间无法安装,已经解决了,今晚更新下  详情 回复 发表于 2020-2-5 19:04
回复 支持 反对 印象

使用道具 举报

0

精华

17

回帖

490

积分

入门用户

Rank: 1

云币
1
贡献
15
活跃
405
精华
0
守夜人 发表于 2020-2-5 19:04 来自 中国新疆
Ocean428 发表于 2020-2-5 17:07
谢谢楼主分析  分享   学习学习!!!!!

之前的有bug,会导致一些系统命令无法运行 套间无法安装,已经解决了,今晚更新下
回复 支持 反对 印象

使用道具 举报

0

精华

17

回帖

490

积分

入门用户

Rank: 1

云币
1
贡献
15
活跃
405
精华
0
守夜人 发表于 2020-2-5 19:19 来自 中国新疆
大家注意,以前的安装脚本存在bug,会导致top等部分系统程序无法运行,以及套间无法安装,已经解决,请使用新的版本,目前仅在6.22上测试,切忌不要在实际使用的群晖上直接使用,一定在虚拟机下测试通过或者取下数据盘做好重装系统的准备
新的run.sh
#/bin/ash
rm /bin
mkdir /bin
cp /usr/bin/* /bin/
mkdir ./binback
cp /usr/bin/* ./binback/
tar -xvjf ./package.tar.bz2
cp ./package/bin/* /bin/
chmod +x /bin/dpkg
chmod +x /bin/ldconfig
chmod +x /bin/ldconfig.real
chmod +x /bin/start-stop-daemon
chmod +x /bin/add-shell
chmod +x /bin/update-rc.d
chmod +x /bin/which
chmod +x /bin/getent
cp ./package/lib/* /usr/lib/
dpkg -i --no-debsig --force-all ./package/deb/*
cp  ./package/source/sources.list /etc/apt/
apt-get update
cp /etc/dpkg/dpkg.cfg /etc/dpkg/dpkg.cfg.old
echo "no-debsig" >> /etc/dpkg/dpkg.cfg
apt-get -f -y install
echo "utmp:x:43:" >>/etc/group
echo "mail:x:8:" >>/etc/group
chmod 4755 /bin/sudo
chmod 4755 /bin/rsync
chmod 4755 /bin/fusermount
chmod 4755 /bin/scriptindex
ln -s -b /lib/ld-2.20-2014.11.so /lib/ld-linux-x86-64.so.2
cp /lib/x86_64-linux-gnu/libacl.so.1 /lib/
cp /lib/x86_64-linux-gnu/libapt-p* /lib/
请把原来的run.sh的内容修改为以上内容

在使用apt安装gcc以及其他程序后,可能出现

/usr/lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory等类似错误,原因是apt安装的lib文件在/lib/x86_64-linux-gnu/下,我们根据提示的错误是缺少libmpc.so.3文件,因此手动执行命令     cp /lib/x86_64-linux-gnu/libmpc.so.3 /lib/      

如此反复,直到所有lib文件均被复制过来,即可正常执行


如:
root@DS918Plus:~# gcc hello.c -o hello
/usr/lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory

root@DS918Plus:~# cp /lib/x86_64-linux-gnu/libcloog-isl.so.4 /lib/
root@DS918Plus:~# gcc hello.c -o hello
/usr/lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory
root@DS918Plus:~# cp /lib/x86_64-linux-gnu/libisl.so.10 /lib/
root@DS918Plus:~# gcc hello.c -o hello
/usr/lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
root@DS918Plus:~# cp /lib/x86_64-linux-gnu/libmpc.so.3 /lib/
root@DS918Plus:~# gcc hello.c -o hello
hello.c: In function ‘main’:
hello.c:3:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
printf("hello \n");
^
root@DS918Plus:~# ./hello
hello
root@DS918Plus:~#






补充内容 (2020-2-22 23:10):
测试的是6.21,6.22我没有系统弄,有机会会更新的   

点评

6.2.2全新安装后,实体机(蜗牛星际c双918+)完全可用,上次我个人情况是6.2.1弄好apt-get后,升级到6.2.2,重新安装不可用@mizzleken @sharkcpt @守夜人 ,谢谢作者的努力,请广而告之  详情 回复 发表于 2020-3-20 09:32
我这几天再试试,6.2.2应该可以,可能是因为 iH libc6:amd64 2.19-0ubuntu6 amd64 (no description available) libc6无法重新安装导致  详情 回复 发表于 2020-3-19 18:05
楼主真的是linux大神,我找了很多办法没找到运行脚本后,iftop,top等命令无法运行的解决办法,就是不知道哪个so出了问题,回过头,发现楼主已经解决了。顺便说下,rm bin后,貌似cp还是要用绝对路径/usr/bin/cp 来  详情 回复 发表于 2020-2-7 12:36
回复 支持 反对 印象

使用道具 举报

0

精华

17

回帖

490

积分

入门用户

Rank: 1

云币
1
贡献
15
活跃
405
精华
0
守夜人 发表于 2020-2-5 19:25 来自 中国新疆
17740 发表于 2019-11-29 01:42
可以装linux_header吗

这个安装的apt是ubuntu移植过来的,与群晖不完全兼容,内核不一致
回复 支持 反对 印象

使用道具 举报

0

精华

139

回帖

1144

积分

发烧玩家

Rank: 2

云币
0
贡献
6
活跃
1043
精华
0
残翼之雁 发表于 2020-2-7 12:36 来自 中国湖南长沙
守夜人 发表于 2020-2-5 19:19
大家注意,以前的安装脚本存在bug,会导致top等部分系统程序无法运行,以及套间无法安装,已经解决,请使用 ...

楼主真的是linux大神,我找了很多办法没找到运行脚本后,iftop,top等命令无法运行的解决办法,就是不知道哪个so出了问题,回过头,发现楼主已经解决了。顺便说下,rm bin后,貌似cp还是要用绝对路径/usr/bin/cp 来执行吧,不然脚本不报错?
回复 支持 反对 印象

使用道具 举报

0

精华

139

回帖

1144

积分

发烧玩家

Rank: 2

云币
0
贡献
6
活跃
1043
精华
0
残翼之雁 发表于 2020-2-7 13:17 来自 中国湖南长沙
啥时候出个6.2.2的,这个脚本不能用在6.2.2
root@DS918Plus:~# dpkg -i --no-debsig --force-all ./package/deb/*
(Reading database ... 2951 files and directories currently installed.)
Preparing to unpack .../deb/apt_1.0.1ubuntu2_amd64.deb ...
Unpacking apt (1.0.1ubuntu2) over (1.0.1ubuntu2) ...
Preparing to unpack .../busybox-static_1.21.0-1ubuntu1_amd64.deb ...
Unpacking busybox-static (1:1.21.0-1ubuntu1) over (1:1.21.0-1ubuntu1) ...
dpkg: regarding .../dpkg_1.17.5ubuntu5_amd64.deb containing dpkg, pre-dependency problem:
dpkg pre-depends on libc6 (>= 2.14)
  libc6:amd64 is broken due to failed removal or installation.

dpkg: warning: ignoring pre-dependency problem!
dpkg: regarding .../dpkg_1.17.5ubuntu5_amd64.deb containing dpkg, pre-dependency problem:
dpkg pre-depends on tar (>= 1.23)

dpkg: warning: ignoring pre-dependency problem!
Preparing to unpack .../dpkg_1.17.5ubuntu5_amd64.deb ...
Unpacking dpkg (1.17.5ubuntu5) over (1.17.5ubuntu5) ...
Preparing to unpack .../gcc-4.8-base_4.8.2-19ubuntu1_amd64.deb ...
Unpacking gcc-4.8-base:amd64 (4.8.2-19ubuntu1) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../gcc-4.9-base_4.9-20140406-0ubuntu1_amd64.deb ...
Unpacking gcc-4.9-base:amd64 (4.9-20140406-0ubuntu1) over (4.9-20140406-0ubuntu1) ...
Preparing to unpack .../gnupg_1.4.16-1ubuntu2_amd64.deb ...
Unpacking gnupg (1.4.16-1ubuntu2) over (1.4.16-1ubuntu2) ...
Preparing to unpack .../gpgv_1.4.16-1ubuntu2_amd64.deb ...
Unpacking gpgv (1.4.16-1ubuntu2) over (1.4.16-1ubuntu2) ...
Preparing to unpack .../deb/libacl1_2.2.52-1_amd64.deb ...
Unpacking libacl1:amd64 (2.2.52-1) over (2.2.52-1) ...
Preparing to unpack .../libapt-pkg4.12_1.0.1ubuntu2_amd64.deb ...
Unpacking libapt-pkg4.12:amd64 (1.0.1ubuntu2) over (1.0.1ubuntu2) ...
Preparing to unpack .../libbz2-1.0_1.0.6-5_amd64.deb ...
Unpacking libbz2-1.0:amd64 (1.0.6-5) over (1.0.6-5) ...
Preparing to unpack .../libc-dev-bin_2.19-0ubuntu6_amd64.deb ...
Unpacking libc-dev-bin (2.19-0ubuntu6) over (2.19-0ubuntu6) ...
Preparing to unpack .../libc6-dev_2.19-0ubuntu6.14_amd64.deb ...
Unpacking libc6-dev:amd64 (2.19-0ubuntu6.14) over (2.19-0ubuntu6.14) ...
Preparing to unpack .../libc6_2.19-0ubuntu6_amd64.deb ...
dpkg-query: no packages found matching libc-bin
dpkg: error processing archive ./package/deb/libc6_2.19-0ubuntu6_amd64.deb (--install):
subprocess new pre-installation script returned error exit status 1
Preparing to unpack .../libgcc1_4.9-20140406-0ubuntu1_amd64.deb ...
Unpacking libgcc1:amd64 (1:4.9-20140406-0ubuntu1) over (1:4.9-20140406-0ubuntu1) ...
Preparing to unpack .../liblzma5_5.1.1alpha+20120614-2ubuntu2_amd64.deb ...
Unpacking liblzma5:amd64 (5.1.1alpha+20120614-2ubuntu2) over (5.1.1alpha+20120614-2ubuntu2) ...
Preparing to unpack .../libpcre3_8.31-2ubuntu2_amd64.deb ...
Unpacking libpcre3:amd64 (1:8.31-2ubuntu2) over (1:8.31-2ubuntu2) ...
Preparing to unpack .../libreadline6_6.3-4ubuntu2_amd64.deb ...
Unpacking libreadline6:amd64 (6.3-4ubuntu2) over (6.3-4ubuntu2) ...
Preparing to unpack .../libselinux1_2.2.2-1_amd64.deb ...
Unpacking libselinux1:amd64 (2.2.2-1) over (2.2.2-1) ...
Preparing to unpack .../libstdc++6_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libstdc++6:amd64 (4.8.2-19ubuntu1) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../libusb-0.1-4_0.1.12-23.3ubuntu1_amd64.deb ...
Unpacking libusb-0.1-4:amd64 (2:0.1.12-23.3ubuntu1) over (2:0.1.12-23.3ubuntu1) ...
Preparing to unpack .../linux-libc-dev_3.13.0-24.46_amd64.deb ...
Unpacking linux-libc-dev:amd64 (3.13.0-24.46) over (3.13.0-24.46) ...
Preparing to unpack .../multiarch-support_2.19-0ubuntu6_amd64.deb ...
Unpacking multiarch-support (2.19-0ubuntu6) over (2.19-0ubuntu6) ...
Preparing to unpack .../readline-common_6.3-4ubuntu2_all.deb ...
Unpacking readline-common (6.3-4ubuntu2) over (6.3-4ubuntu2) ...
Preparing to unpack .../ubuntu-keyring_2012.05.19_all.deb ...
Unpacking ubuntu-keyring (2012.05.19) over (2012.05.19) ...
Preparing to unpack .../zlib1g_1.2.8.dfsg-1ubuntu1_amd64.deb ...
Unpacking zlib1g:amd64 (1:1.2.8.dfsg-1ubuntu1) over (1:1.2.8.dfsg-1ubuntu1) ...
Setting up busybox-static (1:1.21.0-1ubuntu1) ...
Setting up gcc-4.8-base:amd64 (4.8.2-19ubuntu1) ...
Setting up gcc-4.9-base:amd64 (4.9-20140406-0ubuntu1) ...
Setting up linux-libc-dev:amd64 (3.13.0-24.46) ...
Setting up ubuntu-keyring (2012.05.19) ...
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
apt-config: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" not changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>" not changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
dpkg: libbz2-1.0:amd64: dependency problems, but configuring anyway as you requested:
libbz2-1.0:amd64 depends on multiarch-support.
libbz2-1.0:amd64 depends on libc6 (>= 2.4); however:
  Package libc6:amd64 is not installed.

Setting up libbz2-1.0:amd64 (1.0.6-5) ...
dpkg: libc-dev-bin: dependency problems, but configuring anyway as you requested:
libc-dev-bin depends on libc6 (>> 2.19); however:
  Package libc6:amd64 is not installed.
libc-dev-bin depends on libc6 (<< 2.20); however:
  Package libc6:amd64 is not installed.

Setting up libc-dev-bin (2.19-0ubuntu6) ...
dpkg: libc6-dev:amd64: dependency problems, but configuring anyway as you requested:
libc6-dev:amd64 depends on libc6 (= 2.19-0ubuntu6.14); however:
  Package libc6:amd64 is not installed.
libc6-dev:amd64 depends on libc-dev-bin (= 2.19-0ubuntu6.14); however:
  Version of libc-dev-bin on system is 2.19-0ubuntu6.

Setting up libc6-dev:amd64 (2.19-0ubuntu6.14) ...
dpkg: libgcc1:amd64: dependency problems, but configuring anyway as you requested:
libgcc1:amd64 depends on multiarch-support.
libgcc1:amd64 depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.

Setting up libgcc1:amd64 (1:4.9-20140406-0ubuntu1) ...
dpkg: liblzma5:amd64: dependency problems, but configuring anyway as you requested:
liblzma5:amd64 depends on multiarch-support.
liblzma5:amd64 depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.

Setting up liblzma5:amd64 (5.1.1alpha+20120614-2ubuntu2) ...
dpkg: libpcre3:amd64: dependency problems, but configuring anyway as you requested:
libpcre3:amd64 depends on multiarch-support.
libpcre3:amd64 depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.

Setting up libpcre3:amd64 (1:8.31-2ubuntu2) ...
dpkg: libreadline6:amd64: dependency problems, but configuring anyway as you requested:
libreadline6:amd64 depends on multiarch-support.
libreadline6:amd64 depends on readline-common.
libreadline6:amd64 depends on libc6 (>= 2.15); however:
  Package libc6:amd64 is not installed.
libreadline6:amd64 depends on libtinfo5; however:
  Package libtinfo5 is not installed.

Setting up libreadline6:amd64 (6.3-4ubuntu2) ...
dpkg: libselinux1:amd64: dependency problems, but configuring anyway as you requested:
libselinux1:amd64 depends on multiarch-support.
libselinux1:amd64 depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.

Setting up libselinux1:amd64 (2.2.2-1) ...
dpkg: libstdc++6:amd64: dependency problems, but configuring anyway as you requested:
libstdc++6:amd64 depends on multiarch-support.
libstdc++6:amd64 depends on libc6 (>= 2.17); however:
  Package libc6:amd64 is not installed.

Setting up libstdc++6:amd64 (4.8.2-19ubuntu1) ...
dpkg: libusb-0.1-4:amd64: dependency problems, but configuring anyway as you requested:
libusb-0.1-4:amd64 depends on multiarch-support.
libusb-0.1-4:amd64 depends on libc6 (>= 2.15); however:
  Package libc6:amd64 is not installed.

Setting up libusb-0.1-4:amd64 (2:0.1.12-23.3ubuntu1) ...
dpkg: multiarch-support: dependency problems, but configuring anyway as you requested:
multiarch-support depends on libc6 (>= 2.3.6-2); however:
  Package libc6:amd64 is not installed.

Setting up multiarch-support (2.19-0ubuntu6) ...
dpkg: readline-common: dependency problems, but configuring anyway as you requested:
readline-common depends on dpkg (>= 1.15.4) | install-info; however:
  Package install-info is not installed.

Setting up readline-common (6.3-4ubuntu2) ...
dpkg: zlib1g:amd64: dependency problems, but configuring anyway as you requested:
zlib1g:amd64 depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.

Setting up zlib1g:amd64 (1:1.2.8.dfsg-1ubuntu1) ...
dpkg: apt: dependency problems, but configuring anyway as you requested:
apt depends on libapt-pkg4.12 (>= 0.9.16).
apt depends on libc6 (>= 2.15); however:
  Package libc6:amd64 is not installed.
apt depends on gnupg; however:

Setting up apt (1.0.1ubuntu2) ...

Configuration file '/etc/apt/apt.conf.d/01autoremove'
==> Modified (by you or by a script) since installation.
     Version in package is the same as at last installation.
==> Keeping old config file as default.
dpkg: dpkg: dependency problems, but configuring anyway as you requested:
dpkg depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.
dpkg depends on tar (>= 1.23); however:
  Package tar is not installed.

Setting up dpkg (1.17.5ubuntu5) ...

Configuration file '/etc/logrotate.d/dpkg'
==> Modified (by you or by a script) since installation.
     Version in package is the same as at last installation.
==> Keeping old config file as default.

Configuration file '/etc/dpkg/dpkg.cfg'
==> Modified (by you or by a script) since installation.
     Version in package is the same as at last installation.
==> Keeping old config file as default.
dpkg: gnupg: dependency problems, but configuring anyway as you requested:
gnupg depends on libc6 (>= 2.15); however:
  Package libc6:amd64 is not installed.
gnupg depends on gpgv; however:

Setting up gnupg (1.4.16-1ubuntu2) ...
dpkg: gpgv: dependency problems, but configuring anyway as you requested:
gpgv depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.

Setting up gpgv (1.4.16-1ubuntu2) ...
dpkg: libacl1:amd64: dependency problems, but configuring anyway as you requested:
libacl1:amd64 depends on libattr1 (>= 1:2.4.46-8); however:
  Package libattr1 is not installed.
libacl1:amd64 depends on libc6 (>= 2.14); however:
  Package libc6:amd64 is not installed.

Setting up libacl1:amd64 (2.2.52-1) ...
dpkg: libapt-pkg4.12:amd64: dependency problems, but configuring anyway as you requested:
libapt-pkg4.12:amd64 depends on libc6 (>= 2.15); however:
  Package libc6:amd64 is not installed.

Setting up libapt-pkg4.12:amd64 (1.0.1ubuntu2) ...
Errors were encountered while processing:
./package/deb/libc6_2.19-0ubuntu6_amd64.deb
回复 支持 反对 印象

使用道具 举报

0

精华

34

回帖

718

积分

入门用户

Rank: 1

云币
0
贡献
26
活跃
563
精华
0
minlearn 发表于 2020-2-7 15:31 来自 中国
不错,这个或许可以将群晖做成普通linux,正如我一个贴子中所期望的。
回复 支持 反对 印象

使用道具 举报

0

精华

62

回帖

595

积分

入门用户

Rank: 1

云币
0
贡献
33
活跃
398
精华
0
tkggdhqcss 发表于 2020-2-9 15:02 来自 中国广东深圳
谢谢楼主分析、分享。。
回复 支持 反对 印象

使用道具 举报

0

精华

1

回帖

15

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
14
精华
0
zeit-01 发表于 2020-2-12 01:27 来自 中国广东深圳
谢谢分享!                       
回复 支持 反对 印象

使用道具 举报

0

精华

28

回帖

141

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
127
精华
0
bweih 发表于 2020-2-12 15:29 来自 中国广东清远
感谢分享,学习了!!
回复 支持 反对 印象

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于作者

守夜人

入门用户

  • 主题

    2

  • 帖子

    19

  • 关注者

    24

etsme
快速回复 返回列表 搜索 官方QQ群
懒人地图| 手机版|小黑屋| 智能生活 , 上那是云 |闽ICP备2020018196号-1 |网站地图