当在 LFS 中 chroot 时尝试perl Makefile.pl
XML-Parser-2.44 时,我收到此错误:
Checking if your kit is complete...
Looks good
Warning: prerequisite LWP::UserAgent 0 not found.
Have /tools/lib/perl5/5.26.0
Want /tools/lib/perl5/5.26.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.26.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Have /tools/lib/perl5/5.26.0
Want /tools/lib/perl5/5.26.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.26.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
ERROR from evaluation of /sources/XML-Parser-2.44/Expat/Makefile.PL: Failed to opendir '/tools/lib/perl5/5.26.0/x86_64-linux/CORE' to find header files: No such file or directory at /tools/lib/perl5/5.26.0/ExtUtils/MM_Any.pm line 3027.
答案1
只需添加这一行:/usr/local/lib
到此文件/etc/ld.so.conf.d/local.conf
并重新安装 Perl。
$ echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf