找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 343|回复: 6

Installing gcc-8 from http://pkg.loongnix.cn/loongnix/pool/main/g/gcc-8/

[复制链接]

1

主题

17

回帖

51

积分

注册会员

积分
51
发表于 2024-6-17 21:27:57 | 显示全部楼层 |阅读模式
本帖最后由 riple 于 2024-6-19 20:02 编辑

昨天Wifi没配置好,先是dhcp,然后是dns的问题。就准备从PC上下载Nginx Directory (loongnix.cn)上gcc的deb包,通过网线scp拷贝到99Pi上,手动安装。
一通dpkg -i *.deb,结果一堆依赖没解决完,还把apt搞坏了。
现在解决了dhcp和dns的问题,发现apt不能用了,所有apt命令都报:
apt: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory


求高手指导,该如何修复该问题。

1

主题

17

回帖

51

积分

注册会员

积分
51
 楼主| 发表于 2024-6-19 04:33:23 | 显示全部楼层
I managed to install gcc-8 by manually download the below packages:

  1. binutils_2.31.1-16.lnd.vec.27_loongarch64.deb
  2. binutils-common_2.31.1-16.lnd.vec.27_loongarch64.deb
  3. binutils-loongarch64-linux-gnu_2.31.1-16.lnd.vec.27_loongarch64.deb
  4. cpp-8_8.3.0-6.lnd.vec.37_loongarch64.deb
  5. gcc-8_8.3.0-6.lnd.vec.37_loongarch64.deb
  6. gcc-8-base_8.3.0-6.lnd.vec.37_loongarch64.deb
  7. libatomic1_8.3.0-6.lnd.vec.37_loongarch64.deb
  8. libbinutils_2.31.1-16.lnd.vec.27_loongarch64.deb
  9. libcc1-0_8.3.0-6.lnd.vec.37_loongarch64.deb
  10. libgcc1_8.3.0-6.lnd.vec.37_loongarch64.deb
  11. libgcc-8-dev_8.3.0-6.lnd.vec.37_loongarch64.deb
  12. libgmp10_6.1.2%2Bdfsg-4.lnd.2_loongarch64.deb
  13. libgomp1_8.3.0-6.lnd.vec.37_loongarch64.deb
  14. libisl19_0.20-2.1_loongarch64.deb
  15. libisl-dev_0.20-2.1_loongarch64.deb
  16. libmpc3_1.1.0-1.1_loongarch64.deb
  17. libmpfr6_4.0.2-1.1_loongarch64.deb
  18. zlib1g_1.2.11.dfsg-1.lnd.4_loongarch64.deb
复制代码


gcc-8 is successfully installed. But when I tried to compile a simple program, it reports:

  1. root@LoongOS:work# gcc-8 hello.c
  2. /usr/lib/gcc/loongarch64-linux-gnu/8/cc1: error while loading shared libraries: libisl.so.19: cannot open shared object file: No such file or directory
复制代码

1

主题

17

回帖

51

积分

注册会员

积分
51
 楼主| 发表于 2024-6-19 04:36:24 | 显示全部楼层
I checked that the missing files are in:
  1. root@LoongOS:work# ll /usr/lib/loongarch64-linux-gnu/
  2. total 16120
  3. drwxr-xr-x 2 root root     4096 May 29 08:55 ldscripts
  4. lrwxrwxrwx 1 root root       18 May 29 08:55 libatomic.so.1 -> libatomic.so.1.2.0
  5. -rw-r--r-- 1 root root    34744 Oct 13  2023 libatomic.so.1.2.0
  6. -rw-r--r-- 1 root root   961200 Jun  1  2023 libbfd-2.31.1.20190122.so
  7. lrwxrwxrwx 1 root root       15 May 29 08:55 libcc1.so.0 -> libcc1.so.0.0.0
  8. -rw-r--r-- 1 root root   135528 Oct 13  2023 libcc1.so.0.0.0
  9. -rw-r--r-- 1 root root   346496 Oct 13  2023 libgcc_s.so.1
  10. lrwxrwxrwx 1 root root       16 May 29 08:55 libgmp.so.10 -> libgmp.so.10.3.2
  11. -rw-r--r-- 1 root root   611120 Jan 28  2022 libgmp.so.10.3.2
  12. lrwxrwxrwx 1 root root       16 May 29 08:55 libgomp.so.1 -> libgomp.so.1.0.0
  13. -rw-r--r-- 1 root root   216200 Oct 13  2023 libgomp.so.1.0.0
  14. -rw-r--r-- 1 root root 10679936 Jan 28  2022 libisl.a
  15. lrwxrwxrwx 1 root root       16 May 29 08:55 libisl.so -> libisl.so.19.1.0
  16. lrwxrwxrwx 1 root root       16 May 29 08:55 libisl.so.19 -> libisl.so.19.1.0
  17. -rw-r--r-- 1 root root  2392928 Jan 28  2022 libisl.so.19.1.0
  18. lrwxrwxrwx 1 root root       15 May 29 08:55 libmpc.so.3 -> libmpc.so.3.1.0
  19. -rw-r--r-- 1 root root   134560 Jan 28  2022 libmpc.so.3.1.0
  20. lrwxrwxrwx 1 root root       16 May 29 08:55 libmpfr.so.6 -> libmpfr.so.6.0.2
  21. -rw-r--r-- 1 root root   562072 Jan 28  2022 libmpfr.so.6.0.2
  22. -rw-r--r-- 1 root root   280792 Jun  1  2023 libopcodes-2.31.1.20190122.so
  23. lrwxrwxrwx 1 root root       14 May 29 08:55 libz.so.1 -> libz.so.1.2.11
  24. -rw-r--r-- 1 root root   117152 Sep 20  2022 libz.so.1.2.11
  25. drwxr-xr-x 2 root root     4096 May 29 08:55 pkgconfig
复制代码

1

主题

17

回帖

51

积分

注册会员

积分
51
 楼主| 发表于 2024-6-19 04:38:19 | 显示全部楼层
本帖最后由 riple 于 2024-6-19 05:07 编辑

Another issue is that the Wifi configuration does not work any more:
  1. root@LoongOS:~# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
  2. wpa_supplicant: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
复制代码




22

主题

58

回帖

343

积分

超级版主

积分
343
发表于 2024-6-19 15:51:38 | 显示全部楼层
针对这个问题,我在”意见和建议“里面回复了,可以试试看

1

主题

17

回帖

51

积分

注册会员

积分
51
 楼主| 发表于 2024-6-19 19:57:57 | 显示全部楼层
Thank you so much!
All the above commands work now!

I added the variable as you suggested:
  1. export LD_LIBRARY_PATH=/usr/lib/loongarch64-linux-gnu/
复制代码

10

主题

42

回帖

178

积分

注册会员

积分
178
发表于 2024-6-20 08:50:51 | 显示全部楼层
给大佬点赞
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2024-9-20 07:47 , Processed in 0.080940 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表