I am trying to compile some software in Windows using MSYS2 mingw64.exe terminal.
On running the autoreconf -i command, I get the error:
-bash: /usr/bin/autoreconf: /usr/bin/perl: bad interpreter: No such file or directory
ls /usr/bin/ doesn't show perl.exe
I remember that perl was installed using some pacman -S command.
As far as I remember, this issue has come up since this month. (I had reinstalled MSYS2 and Pacman packages thrice this month & the issue does not seem to go. Last time, I had installed all these in May this year & there were no such issues then)
I even re-installed perl in Msys2 and the following output is displayed:
$ 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.)
Still, the same issue -bash: /usr/bin/autoreconf: /usr/bin/perl: bad interpreter: No such file or directory appears
I also tried installing older version(5.28) of perl by:
pacman -S mingw-w64-i686-perl mingw-w64-x86_64-perl
Still the same issue
On further observation, I found out that the perl was getting installed in /mingw64/bin directory instead of /usr/bin. I tried adding /mingw64/bin directory to the PATH variable as follows:
export PATH="$PATH:/mingw64/bin"
However, the issue is still the same
Please help