安装编译libxml2时遇到的问题- 副本

2020-04-16 09:57

安装libxml2的步骤:

1:tar –zxvf libxml2-sources-2.7.8.tar 进入目录 ./configure 出现

/bin/rm: cannot remove `libtoolT': No such file or directory 需要在configure中添加一句RM=”$RM -f”

或者找到出错的那行,把他删除掉,这里是16355行 注:vi编译器中命令行模式set nu 显示行号 行号- 自动跳行:如16355-

运行 ./configure –host=arm-none-linux-gnueabi 2:make

3:make install

一:在用 WIN7+VMware-6.5+redhat9.0时出现安装libxml2-2.7.8时make不过的情况

NameError:global name 'sorted' is not defined 这是VMware-6.5和redhat9.0的兼容性问题。 需要更换兼容的版本

二:WIN7+VMware-6.5+ubuntu10.10时出现建立共享目录问题

运行vmware-install.pl时出错

执行安装命令 $ sudo ./vmware-install.pl 接下来一路输入回车

中间出现了问题:

What is the location of the directory of C header files that match your runningkernel? [/usr/src/linux/include] 填写C header所在的目录。这里是

/usr/src/linux-headers-2.6.35-22-generic/include

回车还是报错:

2.6.35-22-generic). Even if the module were tocompile successfully, it would not load into the running kernel.

我们只需要在version.h(/usr/src/linux-headers-2.6.35-22-generic/incl ude/linux/下边)中添加 \(kernel版本使用 “uname -r“ 查看)

按回车继续,又会有新的错误提示:

The path \is a kernel headerfile directory, but it does not contain the file \

asexpected. This can happen if the kernel has never been built, or if you have invoked the \mrproper\command in your kernel directory. In any case, youmay want to rebuild your ke

打开一个新的终端输入: $ cd /usr/src/linux-headers-2.6.35-22-generic/include 进入linux目录的上级目录

$ sudo chmod a+rw linux 把linux目录改为可读写

(可以不做)把

/usr/src/linux-headers-2.6.35-22-generic/include/generated/autoconf.h 拷贝到 /usr/src/linux-headers-2.6.35-22-generic/include/linux下

OK,现在/mnt/ghfs 文件夹有了,但是。。。。。/mnt/ghfs下没有共享的文件夹,重启也没有,怎么回事?????

还是兼容想问题,VMware-6.5+ubuntu10.10有兼容性问题

好吧,升级到VMware-7.0.1+ubuntu10.10,按照上面的步骤安装VM-tools,和共享目录都没问题了。

三:这里的虚拟机版本是WIN7+VMware-7.0.1+ubuntu10.10 安装libxml2-2.7.8时make发现出现

Nothing to do for ‘all’

网上说已经是编译好的了,可以直接make install 但是不成功,make clean

后再make问题依旧,发现/usr/local/include/libxml2/libxml已经安装上了,原来系统自带了。

编译xml.c文件时,编译命令如下:

sudo gcc -o xml xml.c -I/usr/local/include/libxml2/libxml -lxml2

注意最后的-lxml2是艾楼不是啊哎,这是链接xml2库 如果出现

/usr/bin/ld: skipping incompatiable //usr/local/lib/libxml2.so when search for -lxml2 cannot find -lxml2

时参看文档 解决+cannot+find+-lxxx+的问题.txt

意思是说/usr/lib下相对应的函式库文件(.so) 的symbolic link 不正确 若不正确改成正确的连结目标即可解决问题。

解决方法如下: cd /usr/lib

ln -s libxml2.so.2.7.7 libxml2.so

libxml2.so.2.7.7是安装的xml库文件libxml2.so是生成的函式库文件(.so) 的symbolic link对应于lxml2

http://bbs.chinaunix.net/thread-3611671-1-1.html http://bbs.chinaunix.net/thread-3611671-1-1.html

http://blog.csdn.net/charistain_huang/article/details/6181215 http://hi.http://www.wodefanwen.com//zhangyun75/item/46bcedb6b396fa941846977b http://blog.csdn.net/fangang001/article/details/6699391 http://bbs.csdn.net/topics/390465962?page=1


安装编译libxml2时遇到的问题- 副本.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:农业合作社产业化产业基地分析报告

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: