Skip to content

Instantly share code, notes, and snippets.

@zrhoffman
Created April 2, 2020 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zrhoffman/328de0aa2c357ffcee10a3e211dc595c to your computer and use it in GitHub Desktop.
Save zrhoffman/328de0aa2c357ffcee10a3e211dc595c to your computer and use it in GitHub Desktop.
Install WWW::Curl::Easy and Net::Pcap in CentOS 8
#!/usr/bin/env bash
modules=(WWW::Curl::Easy Net::Pcap);
patches=(http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/WWW-Curl-4.17-RT117793.patch https://src.fedoraproject.org/rpms/perl-Net-Pcap/raw/master/f/Net-Pcap-0.18-Fix-build-with-libpcap-1.9.0.patch);
for index in ${!modules[@]}; do
<<BASH_COMMANDS SHELL=/bin/bash cpanm --local-lib=./local --look ${modules[$index]};
trap 'echo "Error on line \${LINENO} of '"\$0"'"; exit 1' ERR;
set -o errexit -o pipefail;
curl -v '${patches[$index]}' |
patch;
perl Makefile.PL;
make;
make install;
BASH_COMMANDS
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment