智能公元论坛

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

解决lib32bz2-1.0无法安装的问题

[复制链接]

1

主题

2

帖子

43

积分

新手上路

Rank: 1

积分
43
发表于 2022-1-6 14:40:25 | 显示全部楼层 |阅读模式

根据二次开发文档中的环境搭建文档 在ubuntu18.04(64位)安装lib32bz2-1.0时却提示无法找到
网上搜索了一下原因 在https://ubuntuqa.com/article/1709.html找到解决方案如下:
您正在寻找的软件包(32位)是libbz2-1.0:i386,其64位版本是libbz2-1.0:amd64。
首先启用multi-arch支持(如果尚未完成):
sudo dpkg --add-architecture i386
现在运行:
sudo apt-get update
您现在可以通过以下方式安装包:
sudo apt-get install libbz2-1.0:i386
回复

使用道具 举报

1

主题

2

帖子

43

积分

新手上路

Rank: 1

积分
43
 楼主| 发表于 2022-1-6 15:09:49 | 显示全部楼层
不过碰到了其他的问题 尝试build出错了
提示信息如下:
/opt/Andestech/BSPv422/toolchains/nds32le-elf-mculib-v3s/bin/nds32le-elf-gcc: Exec format error
起先怀疑是依赖的库没有装好 于是进行了帖子开头的操作
但是完成以后依然报这个错误
尝试用readelf去读取它的依赖库 显示的结果如下:
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x804b100
  Start of program headers:          52 (bytes into file)
  Start of section headers:          1288420 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         5
  Size of section headers:           40 (bytes)
  Number of section headers:         24
  Section header string table index: 23

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .note.ABI-tag     NOTE            080480d4 0000d4 000020 00   A  0   0  4
  [ 2] .init             PROGBITS        080480f4 0000f4 00000d 00  AX  0   0  4
  [ 3] .text             PROGBITS        08048110 000110 0c4430 00  AX  0   0 16
  [ 4] __libc_freeres_fn PROGBITS        0810c540 0c4540 00100f 00  AX  0   0 16
  [ 5] .fini             PROGBITS        0810d550 0c5550 000017 00  AX  0   0  4
  [ 6] .rodata           PROGBITS        0810d580 0c5580 05553c 00   A  0   0 64
  [ 7] __libc_subfreeres PROGBITS        08162abc 11aabc 00002c 00   A  0   0  4
  [ 8] __libc_atexit     PROGBITS        08162ae8 11aae8 000004 00   A  0   0  4
  [ 9] .eh_frame         PROGBITS        08162aec 11aaec 01dc20 00   A  0   0  4
  [10] .gcc_except_table PROGBITS        0818070c 13870c 000278 00   A  0   0  4
  [11] .tdata            PROGBITS        08181000 139000 000010 00 WAT  0   0  4
  [12] .tbss             NOBITS          08181010 139010 000020 00 WAT  0   0  4
  [13] .init_array       INIT_ARRAY      08181010 139010 000008 00  WA  0   0  4
  [14] .fini_array       FINI_ARRAY      08181018 139018 000008 00  WA  0   0  4
  [15] .jcr              PROGBITS        08181020 139020 000004 00  WA  0   0  4
  [16] .data.rel.ro      PROGBITS        08181040 139040 000964 00  WA  0   0 64
  [17] .got              PROGBITS        081819a4 1399a4 000014 04  WA  0   0  4
  [18] .got.plt          PROGBITS        081819b8 1399b8 00000c 04  WA  0   0  4
  [19] .data             PROGBITS        08181a00 139a00 000d58 00  WA  0   0 64
  [20] .bss              NOBITS          08182780 13a758 0082b0 00  WA  0   0 64
  [21] __libc_freeres_pt NOBITS          0818aa30 13a758 000014 00  WA  0   0  4
  [22] .comment          PROGBITS        00000000 13a758 00009b 00      0   0  1
  [23] .shstrtab         STRTAB          00000000 13a7f3 0000ee 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  p (processor specific)

There are no section groups in this file.

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000000 0x08048000 0x08048000 0x138984 0x138984 R E 0x1000
  LOAD           0x139000 0x08181000 0x08181000 0x01758 0x09a44 RW  0x1000
  NOTE           0x0000d4 0x080480d4 0x080480d4 0x00020 0x00020 R   0x4
  TLS            0x139000 0x08181000 0x08181000 0x00010 0x00030 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x10

Section to Segment mapping:
  Segment Sections...
   00     .note.ABI-tag .init .text __libc_freeres_fn .fini .rodata __libc_subfreeres __libc_atexit .eh_frame .gcc_except_table
   01     .tdata .init_array .fini_array .jcr .data.rel.ro .got .got.plt .data .bss __libc_freeres_ptrs
   02     .note.ABI-tag
   03     .tdata .tbss
   04

There is no dynamic section in this file.

There are no relocations in this file.

The decoding of unwind sections for machine type Intel 80386 is not currently supported.

No version information found in this file.

Displaying notes found in: .note.ABI-tag
  Owner                 Data size       Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
    OS: Linux, ABI: 2.6.9

动态段信息为There is no dynamic section in this file. 即无依赖的动态库。
那这个Exec format error从何而来就不得而知了,有没有和我一样在搭建环境的朋友讨论一下问题?
回复

使用道具 举报

0

主题

17

帖子

42

积分

新手上路

Rank: 1

积分
42
发表于 2022-1-26 12:20:43 | 显示全部楼层
拷贝一个克隆版优班图
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|智能公元论坛 ( 粤ICP备19147158 )

GMT+8, 2024-9-19 09:36 , Processed in 0.061964 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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