安装automake问题解决

本文介绍了在安装automake时遇到的问题,问题源于automake安装路径与@INC配置不匹配,找不到Automake::Config.pm。通过分析@INC的设置,找到解决方案是调整@INC路径以匹配automake的实际安装位置。通过修改datadir设置并验证安装成功,问题得到解决。

遇到问题

Can't locate Automake/Config.pm in @INC(@INC contains: /usr/local/share/automake-1.14 /xxxxx)

问题原因

automake的安装位置和这里@INC设置的位置不一致,导致找不到Automake::Config.pm

问题分析

这个@INC是怎么设置进去的呢?

查看automake-1.14/bin/automake.in中设置方式如下:

@Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')                                                                     
unless @Automake::perl_libdirs;
unshift @INC, @Automake::perl_libdirs;

最终生成的automake(automake-1.14/bin/automake)中的@INC如下:

@Automake::perl_libdirs = ('/usr/local/share/automake-1.14')
unless @Automake::perl_libdirs;
unshift @INC, @Automake::perl_libdirs;

解决办法

明白了问题所在,解决问题的方法也就有了:将@INC的路径和实际安装的automake的Automake/Config.pm所在路径调整一致即可

查看自己所安装的automake的位置,将datadir设置为安装位置路径即可

./configure --datadir=${AUTOMAKE_PATH}

检测

安装成功后,查看安装的automake脚本的版本信息,可成功查看则安装成功

./automake --version

automake (GNU automake) 1.14
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@redhat.com>
   and Alexandre Duret-Lutz <adl@gnu.org>.
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值