编译过程比较简单(感谢原作者

1.         wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz

2.         tar xvf libxml2-2.7.2.tar.gz

3.         cd libxml2-2.7.2

4.         ./configure CROSS_COMPILE=arm-linux- --host=arm-linux --prefix=/opt/libxml2

5.         make

6.        sudo  make install

此时出现一个错误:

./libtool: line 6619: arm-linux-ranlib: command not found
make[2]: *** [install-libLTLIBRARIES] Error 127
make[2]: Leaving directory `/home/cody/downloads/libxml2-2.7.2'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/cody/downloads/libxml2-2.7.2'
make: *** [install-recursive] Error 1

原因是使用sudo时,环境变量改变导致找不到交叉编译器

解决:把交叉编译器的路径放到/etc/bash.bashrc里去。

export PATH=$PATH:/opt/FriendlyARM/toolschain/4.5.1/bin

再安装

su

make install

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2021-08-11
  • 2021-05-15
  • 2022-02-27
  • 2022-02-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2022-12-23
  • 2021-10-25
相关资源
相似解决方案