故障修复:XML-Parser组件缺失
前言
正在编译编译mt7688的固件,正开心这呢,然而突然报错,我瞬间爆炸,然后刷的冷静下来,问题不大我能解决。首先查看打印信息明确故障原因是缺少组件XML-Parser,于是查阅资料补上这个缺口继续编译。
起始bug打印
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for perl... /home/b/Desktop/mt7688/openwrt_widora/staging_dir/host/bin/perl
checking for perl >= 5.8.1... 5.18.2
checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool
make[3]: *** [/home/b/Desktop/mt7688/openwrt_widora/build_dir/host/intltool-0.40.6/.configured] Error 1
make[3]: Leaving directory `/home/b/Desktop/mt7688/openwrt_widora/feeds/packages/libs/intltool'
make[2]: *** [package/feeds/packages/intltool/host/compile] Error 2
make[2]: Leaving directory `/home/b/Desktop/mt7688/openwrt_widora'
make[1]: *** [/home/b/Desktop/mt7688/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
设计解决思路
根据打印网上搜索得知是缺少了XML-Parser组件,因此进行补充。
部分资料显示,需要下载安装源码包:
XML-Parser-2.34.tar.gz
然而对于这个源码包的相关搜索通常指向了付费链接,这不能忍
因此我选择尝试其他思路:
https://www.douban.com/note/493624754/
这篇文章遇到了类似的问题,因此我参照了一下解决步骤。
依次执行
sudo apt-get install libxml-simple-perl
sudo apt-get install libxml-simple-perl
进行第一阶段安装
(打印见下方打印1,操作就是需要y的地方y回车其余回车)
perl -e shell –MCPAN
perl -e shell –MCPAN
进行第二阶段安装2
(非常多的打印,操作就是一路回车)
然后输入
install XML::Parser
cpan[1]>install XML::Parser
进行第三阶段安装
(详细见打印二)
然而出了点问题:
Failed during this command:
TODDR/XML-Parser-2.46.tar.gz : writemakefile NO – No ‘Makefile’ created
我寻思应该是要手动安装
输入quit
离开cpan
perl Makefile.PL
进入下载的目录输入指令
b@ubuntu:~/.cpan/build/XML-Parser-2.46-Wc9hvw$ perl Makefile.PL
出现故障,我认为是缺少Expat
因此输入指令:
b@ubuntu:~/.cpan/build/XML-Parser-2.46-Wc9hvw$ sudo apt-get install expat
b@ubuntu:~/.cpan/build/XML-Parser-2.46-Wc9hvw$ sudo apt-get install libexpat1-dev
重新执行perl Makefile.PL
,通过了
(详细见打印三)
make
(打印太多跳过)
make test
(见相关打印四)
make install
(见相关打印五)
故障了,我认为是缺少权限
使用sudo make install
通过
通过了(部分见打印六)
完结撒花
Signing package index...
make[2]: Leaving directory `/home/b/Desktop/mt7688/openwrt_widora'
make[1]: Leaving directory `/home/b/Desktop/mt7688/openwrt_widora'
b@ubuntu:~/Desktop/mt7688/openwrt_widora$
相关打印
打印1
b@ubuntu:~/Desktop/mt7688/openwrt_widora$ sudo apt-get install libxml-simple-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libencode-locale-perl libfile-listing-perl libfont-afm-perl
libhtml-form-perl libhtml-format-perl libhtml-parser-perl
libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
libhttp-negotiate-perl libio-html-perl liblwp-mediatypes-perl
liblwp-protocol-https-perl libnet-http-perl libwww-perl
libwww-robotrules-perl libxml-namespacesupport-perl libxml-parser-perl
libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl
Suggested packages:
libdata-dump-perl libcrypt-ssleay-perl libauthen-ntlm-perl
The following NEW packages will be installed:
libencode-locale-perl libfile-listing-perl libfont-afm-perl
libhtml-form-perl libhtml-format-perl libhtml-parser-perl
libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
libhttp-negotiate-perl libio-html-perl liblwp-mediatypes-perl
liblwp-protocol-https-perl libnet-http-perl libwww-perl
libwww-robotrules-perl libxml-namespacesupport-perl libxml-parser-perl
libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl
libxml-simple-perl
0 upgraded, 25 newly installed, 0 to remove and 10 not upgraded.
Need to get 1,277 kB of archives.
After this operation, 3,991 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.cn99.com/ubuntu/ trusty/main libencode-locale-perl all 1.03-1 [12.4 kB]
Get:2 http://mirrors.cn99.com/ubuntu/ trusty/main libhttp-date-perl all 6.02-1 [10.4 kB]
Get:3 http://mirrors.cn99.com/ubuntu/ trusty/main libfile-listing-perl all 6.04-1 [9,774 B]
Get:4 http://mirrors.cn99.com/ubuntu/ trusty/main libfont-afm-perl all 1.20-1 [14.3 kB]
Get:5 http://mirrors.cn99.com/ubuntu/ trusty/main libhtml-tagset-perl all 3.20-2 [13.5 kB]
Get:6 http://mirrors.cn99.com/ubuntu/ trusty/main libhtml-parser-perl amd64 3.71-1build1 [98.2 kB]
Get:7 http://mirrors.cn99.com/ubuntu/ trusty/main libio-html-perl all 1.00-1 [15.7 kB]
Get:8 http://mirrors.cn99<