1

我正在尝试使用MSYS2 mingw64.exe终端在 Windows 中编译一些软件。

在运行autoreconf -i命令时,我收到错误:

-bash: /usr/bin/autoreconf: /usr/bin/perl: bad interpreter: No such file or directory

ls /usr/bin/不显示 perl.exe

我记得perl是使用某些pacman -S命令安装的。

据我记得,这个问题是从这个月开始出现的。(本月我已经三次重新安装了 MSYS2 和 Pacman 软件包,问题似乎没有解决。上次,我在今年 5 月安装了所有这些,当时没有这样的问题)

我什至在 Msys2 中重新安装了 perl,并显示以下输出:

$ pacman -S perl
warning: perl-5.30.3-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) perl-5.30.3-1

Total Installed Size:  50.67 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                                                                                      [####################################################################] 100%
(1/1) checking package integrity                                                                                    [####################################################################] 100%
(1/1) loading package files                                                                                         [####################################################################] 100%
(1/1) checking for file conflicts                                                                                   [####################################################################] 100%
(1/1) checking available disk space                                                                                 [####################################################################] 100%
warning: could not get file information for usr/bin/perl.exe
warning: could not get file information for usr/bin/perl5.30.3.exe
:: Processing package changes...
(1/1) reinstalling perl                                                                                             [####################################################################] 100%
warning: warning given when extracting /usr/bin/perl.exe (Can't create '/usr/bin/perl.exe')
warning: warning given when extracting /usr/bin/perl5.30.3.exe (Hard-link target 'usr/bin/perl.exe' does not exist.)

仍然-bash: /usr/bin/autoreconf: /usr/bin/perl: bad interpreter: No such file or directory出现同样的问题

我还尝试通过以下方式安装旧版本(5.28)的 perl:

pacman -S mingw-w64-i686-perl mingw-w64-x86_64-perl

还是同样的问题

进一步观察,我发现 perl 被安装在 /mingw64/bin 目录而不是 /usr/bin 目录中。我尝试将 /mingw64/bin 目录添加到 PATH 变量中,如下所示:

export PATH="$PATH:/mingw64/bin"

但是,问题仍然相同

请帮忙

4

0 回答 0