Installing the Chilkat Perl Module on Linux & Alpine Linux
The quickest way to install the Chilkat module on Linux and Alpine Linux is the one-line installer. The manual procedure below it is for machines without internet access, or if you prefer to install from a downloaded package.
Install with one command
The install-perl script reads your Perl's version, CPU architecture, threading,
and C library (glibc or musl) from the perl that runs it, downloads the matching prebuilt
module, and installs it into that same perl. There is no compiler step and no
make. Because the perl that runs the script is the perl the module goes into,
the version and threading always match.
curl -fsSL https://chilkatdownload.com/perl/install-perl | perl -
# no curl? wget works the same way
wget -qO- https://chilkatdownload.com/perl/install-perl | perl -
sudo.
The script checks first and says so if it cannot write there. Without root, add
--local to install under ~/perl5 for your user only (the script then prints the
PERL5LIB setting to use):
# with curl curl -fsSL https://chilkatdownload.com/perl/install-perl | sudo perl - # with wget wget -qO- https://chilkatdownload.com/perl/install-perl | sudo perl - # per-user, no root needed curl -fsSL https://chilkatdownload.com/perl/install-perl | perl - --local
cpanm --mirror https://chilkatdownload.com/cpan --mirror-only ChilkatIt fetches the same prebuilt package at configure time and installs it through MakeMaker, so cpanm's usual options apply:
--sudo when the site library needs root, or
-l ~/perl5 for a per-user install; cpanm --uninstall Chilkat removes it. A specific release can be installed from its URL,
cpanm https://chilkatdownload.com/cpan/authors/id/C/CH/CHILKAT/Chilkat-<version>.tar.gz.
Other options: --dry-run shows what would be detected and installed without
changing anything; --from <file> installs from an already-downloaded
.tar.gz (offline machines); --version 11.6.0 selects a particular
Chilkat release. The script finishes by loading the module in a fresh perl and printing the
Chilkat version, so OK: 'use chilkat' loads means you are done.
apk add perl there is no curl; busybox wget works instead:
apk add perl wget -qO- https://chilkatdownload.com/perl/install-perl | perl -
Manual install from a downloaded package
For machines without internet access, or if you prefer to download the package yourself.
(With the package downloaded, perl install-perl --from chilkat-perl-<version>-<arch>-linux.tar.gz
also works in place of steps 4–7.)
- C library: use the Linux download on standard (glibc) distributions, and the Alpine download on Alpine Linux (musl). They are not interchangeable.
- CPU architecture:
x86_64oraarch64(64-bit ARM). 32-bit builds (x86,armv7l) are no longer produced. - Threading: a threaded Perl needs the thread-multi download; a non-threaded Perl needs the regular download (see Step 3).
-
Download
Get the build for your system from the Chilkat Linux Perl Downloads (Linux and Alpine are both listed there).
-
What's in the download
Each
.tar.gzcontains:chilkat-perl-<version>-<arch>-linux/ ├─ lib/ │ ├─ chilkat.pm the Perl module │ └─ libchilkat.so the compiled Chilkat library ├─ Makefile.PL build script (ExtUtils::MakeMaker) ├─ MANIFEST ├─ META.yml ├─ test.pl a short test / unlock example ├─ license.pdf ├─ pcre2-license.pdf ├─ quickjs-license.pdf └─ THIRD-PARTY-NOTICES.txt
(The Alpine download has the same layout, with a musl-compatible
libchilkat.so.) -
Match your Perl version, architecture, and threading
Confirm the download matches your system. Check each with:
# Perl version (must match the download's 5.xx) perl -version # CPU architecture (x86_64, aarch64, armv7l, ...) uname -m # Threaded Perl? "define" = use the thread-multi download perl -V:useithreads
If
useithreads='define', download the thread-multi build; ifuseithreads='undef', download the regular build. A mismatch is the usual cause of thePL_stack_baseerror (see below). -
Extract to any directory
tar xzf chilkat-perl-<version>-<arch>-linux.tar.gz
-
Build
In the newly-created directory:
perl Makefile.PL make
The library is prebuilt, so this only generates and runs a Makefile that stages the files — there is no C compilation of Chilkat itself.
-
Install
Still in the same directory:
make install # or, if you need elevated permissions: sudo make installYou need write permission to your Perl library directory — installing system-wide usually requires root.
-
Verify the installation
Run the included
test.pl, or this short script, which unlocks Chilkat in 30-day trial mode and prints the version:use chilkat(); my $glob = new chilkat::CkGlobal(); my $success = $glob->UnlockBundle("Anything for 30-day trial"); if ($success != 1) { print $glob->lastErrorText() . "\n"; exit; } print "Version: " . $glob->version() . "\n";
Notes for Alpine Linux (manual install)
- Use the Alpine download, which is built for musl libc. The standard Linux (glibc) build will not load on Alpine.
- The build needs Perl and
make. If they aren't present:apk add perl make(addperl-utilsorperl-devifExtUtils::MakeMakeris missing). - The remaining steps (extract, build, install, verify) are identical to standard Linux.
Common error: undefined symbol: PL_stack_base
If you see an error like
undefined symbol: PL_stack_base at … DynaLoader.pm when using Chilkat,
it usually means the download's threading does not match your Perl (a non-thread module
with a threaded Perl, or vice-versa). Re-check Step 3 and download the matching
build.