Skip to content

Bio::Graphics installation steps for Rocky Linux 9 or other EL-like distros #396

@ernstki

Description

@ernstki

I'll be closing this issue as soon as opening it, because it's not an issue, per se. It's just to give others something to search for in the issue tracker, and so I have something to link to from our internal documentation.

I've been using Perl for quite a while, but when I cpanm Something::Something and it fails, I'm usually as mystified as anyone. So I'm also hoping this can help someone else who's in the same situation.

Steps required to get Bio::Graphics installed on Rocky Linux 9

These steps will probably work with other RHEL 9-like distros, and other related Bio::Whatever packages, too.

Note

Debian and Ubuntu already include bioperl in their default repositories, so if you're using one of those, or a derivative, installing that package from the distro repositories will save a lot of time.

Install Perl and other required development packages, to preclude build failures in the cpanm command below:

yum update
yum install perl gd-devel libxml2-devel expat-devel perl-App-cpanminus

Note

The installation of cpanminus (cpanm) from the distro repositories is actually not required, but it's helpful because it isn't obvious from cpan's output that some modules failed to build.

It's hard to even tell that cpan failed, except if you scroll up, or inspect the return code.

Next, install Bio::Graphics and look for any failed builds:

cpanm Bio::Graphics

Note

If you run cpanm as root (e.g., in a Docker container), the above actually breaks cpanm! This is why you don't normally do this stuff as root.

Since I'm installing this in a Docker container for testing, I'll just power through it by installing a necessary package from the distro repositories, so we're able to proceed:

yum install -y perl-LWP-Protocol-https

Sorting through the build logs for cpanm Bio::Graphics from above, you'll find mention that Bio::DB::SeqFeature::Store wasn't installed1, so install that manually:

cpanm Bio::DB::SeqFeature::Store

# finally, try again
cpanm Bio::Graphics

Test to make sure the desired package actually got installed:

# perl -MBio::Graphics -e'print $INC{"Bio/Graphics.pm"} . "\n"'
/usr/local/share/perl5/5.32/Bio/Graphics.pm

Notes

  • There are probably at least a handful more distro packages you could install to speed up the process relative to getting them from CPAN and running all the tests (DBI, Test::*, Capture::Tiny, XML::LibXML). The ones I chose from the distro repositories had extra dev dependencies which I wanted to avoid installing.

References

Footnotes

  1. …even though it seems like cpanm should've been able to figure this out that this was a dependency on its own ¯\_(ツ)_/¯

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions