Gcc libtoolize:错误:无法列出文件

Gcc libtoolize:错误:无法列出文件,gcc,autoconf,automake,libtool,Gcc,Autoconf,Automake,Libtool,我在安装libtool 2.4.6时遇到以下问题: libtool: Version mismatch error. This is libtool 2.4.6, revision 2.4.6, libtool: but the definition of this LT_INIT comes from revision . libtool: You should recreate aclocal.m4 with macros from revision 2.4.6 libtool: of l

我在安装libtool 2.4.6时遇到以下问题:

libtool: Version mismatch error.  This is libtool 2.4.6, revision 2.4.6,
libtool: but the definition of this LT_INIT comes from revision .
libtool: You should recreate aclocal.m4 with macros from revision 2.4.6
libtool: of libtool 2.4.6 and run autoconf again.
Makefile:1261: recipe for target 'libltdl/loaders/libltdl_libltdl_la-preopen.lo' failed
为了解决这个问题,在google上四处查看之后,我执行了以下命令来重新创建aclocal.m4。但是,我遇到了“无法列出文件”错误:

目录就在那里,可以用ls命令列出:

[server]#  ls -l /var/tmp/work/libtool-2.4.6.i386/share/libtool/build-aux
total 0

有什么想法吗?

这是由libtoolize脚本中的行引起的:

        test -n "`{ cd $my_dir && ls; } 2>/dev/null`" \
            || func_fatal_error "cannot list files: '$my_dir'"
我不知道为什么它会将空目录解释为“无法列出文件” 可以通过将上述行替换为以下内容来解决此问题:

    cd $my_dir && ls || func_fatal_error "cannot list files: '$my_dir'"

这是一个perl程序。你只是漏掉了最重要的一行。第339行是什么?子例程是如何调用的?(类似于
子函数{
)无论如何,这不会改变您的权限被拒绝的事实。我想您需要
sudo autoeconf--force--install
。感谢您提供的信息。我以root用户身份登录后能够克服权限问题。但现在我得到了:#autoeconf--install libtoolize:错误:无法列出文件:'/var/tmp/work/libtool-2.4.6.i386/share/libtool/build-aux'autoreconf:libtoolize失败,退出状态为:1#ls-l/var/tmp/work/libtool-2.4.6.i386/share/libtool/build-aux total 0do正如我所说的,使用
sudo
。登录
su
和使用
sudo
有细微的区别,这可能会或可能不会影响到我们的Solaris环境中,我们没有sudo指令alled或RBAC。我们只有普通根访问权限…我删除了以前的整个libtool源目录,并以根用户的身份重新开始。我认为这应该保证一致性。是什么导致了这个问题?
    cd $my_dir && ls || func_fatal_error "cannot list files: '$my_dir'"