Installing Perl::LanguageServer fails because IO:AIO error: c compiler cannot create executables - ScienceChronicle
ScienceChronicle
September 6, 2024

Installing Perl::LanguageServer fails because IO:AIO error: c compiler cannot create executables

Posted on September 6, 2024  •  1 minutes  • 195 words
Table of contents

The problem

While attempting to install Perl::LanguageServer on my Linux Mint 20.3 Una, the following command:

cpan install Perl::LanguageServer

failed, reporting that the IO::AIO dependency was unsatisfied.

I tried installing the IO::AIO module separately:

cpan install IO::AIO

However, this resulted in the following error:

Continue anyways?  [y] y
checking for gcc... x86_64-linux-gnu-gcc
checking whether the C compiler works... no
configure: error: in `/home/morpher/.cpan/build/IO-AIO-4.81-7':
configure: error: C compiler cannot create executables
See `config.log` for more details
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
  MLEHMANN/IO-AIO-4.81.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK

Next, I checked whether the required modules, as referred to by the Perl-LanguageServer repository , were installed by running:

sudo apt install libanyevent-perl libclass-refresh-perl libcompiler-lexer-perl \
libdata-dump-perl libio-aio-perl libjson-perl libmoose-perl libpadwalker-perl \
libscalar-list-utils-perl libcoro-perl

During this process, I discovered that the package libcompiler-lexer-perl could not be found. I removed that line and installed the remaining packages. Unfortunately, this didn’t solve the issue.

I also tried:

sudo apt install libc6-dev

But it didn’t help either, as this package was already installed.

The Solution

The real solution turned out to be much simpler:

sudo apt install libperl-dev

Installing libperl-dev successfully resolved the issue with the IO::AIO module installation.


Share


Tags


Counters

Support us

Science Chronicle