Table of Contents
- OS Repositories
- Direct Downloads
- Set the PATH
- Zef Module Manager as a Regular User
- Windows Subsystem for Linux
- Using rakudo-pkg on Travis
- Building Your Own Packages
- Other Rakudo Distributions
rakudo-pkg offers native packages of Rakudo Perl 6 that
closely follow upstream development. Most of the time, the packages will be
released on the same day as the Rakudo sources. At the moment, packages are
provided for Alpine, CentOS, Debian, Fedora, openSUSE and Ubuntu. Feel free to
request new packages.
rakudo-pkg aims to provide small self-contained (no dependencies, no files
/opt/rakudo-pkg), pre-compiled native OS packages that can be used
on user’s computers, servers and –very importantly– containers. Therefor,
only the Rakudo compiler and the
Zef package manager are provided. Third
party modules can be easily installed if desired.
From a security point of view, we like to create the builds in the open: the packages are created, checksummed and automatically uploaded from the code in this repository by Travis CI to Github Releases and Bintray Repositories.
For those users, or rather System Administrators, that prefer to build their
own Rakudo packages,
rakudo-pkg can be used as a build framework. Because
Docker containers are used when creating native Linux packages, any platform
running Docker can be used as a host, including Linux, MacOS and Windows machines.
The easiest way to install the Rakudo (starting from release 2018.04.1) on
Debian, Centos, Fedora, openSUSE and Ubuntu is by using the
repositories. For Alpine, see Direct Downloads.
Debian and Ubuntu
To use the repos on Debian and Ubuntu, you need to add the applicable sources:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61 $ echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | sudo tee -a /etc/apt/sources.list.d/rakudo-pkg.list $ sudo apt-get update && sudo apt-get install rakudo-pkg
If you don’t have
lsb_release installed, you can use the OS codename (e.g.,
stretch, bionic, etc.) instead of the
lsb_release -cs command.
Centos and Fedora
To use the repos on CentOS, Fedora and openSUSE, you need to a repofile:
$ echo -e "[rakudo-pkg]\nname=rakudo-pkg\nbaseurl=https://dl.bintray.com/nxadm/rakudo-pkg-rpms/`lsb_release -is`/`lsb_release -rs| cut -d. -f1`/x86_64\ngpgcheck=0\nenabled=1" | sudo tee -a /etc/yum.repos.d/rakudo-pkg.repo
If you don’t have
redhat-lsb-core installed, you can use the OS name (e.g.,
CentOS, Fedora) instead of the
lsb_release -is command and release (e.g. 7,
26, 27, 28) instead of the one with
Install the package on CentOS:
$ sudo yum install rakudo-pkg
Install the package on Fedora:
$ sudo dnf install rakudo-pkg
To use the repos on openSUSE, you need to add a repo to zypper (accept the key):
$ sudo zypper ar -f https://dl.bintray.com/nxadm/rakudo-pkg-rpms/openSUSE/`lsb_release -rs`/x86_64 rakudo-pkg $ sudo zypper install rakudo-pkg
In case you don’t have
lsb-release installed, you can put the openSUSE
version (e.g. 42.3) instead of the
lsb_release -rs command.
Most modern computer have a 64-bit Operating System, so regular users should use 64-bit packages. The 32-bit are supplied for specific usages, like 32-bit images on some cloud providers. 32-bit Rakudo is not JIT enabled (upstream) and as a result a lot slower.
At the moment the following packages are provided (see the full listing including older versions in the releases tab):
- Alpine 3.6, 64-bit: apk (checksum).
- Alpine 3.7, 64-bit: apk (checksum).
- CentOS 7, 64-bit: rpm (checksum).
- Debian 8, 64-bit: deb (checksum).
- Debian 9, 64-bit: deb (checksum).
- Fedora 26, 64-bit: rpm (checksum).
- Fedora 27, 64-bit: rpm (checksum).
- Fedora 28, 64-bit: rpm (checksum).
- openSUSE 42.3, 64-bit: rpm (checksum).
- Ubuntu 14.04, 64-bit: deb (checksum).
- Ubuntu 16.04, 64-bit: deb (checksum).
- Ubuntu 18.04, 64-bit: deb (checksum).
- Ubuntu 16.04, 32-bit: deb (checksum).
- Ubuntu 18.04, 32-bit: deb (checksum).
You can install these package with the regular package manager of your distribution:
$ sudo apk add --allow-untrusted *.apk
- Debian and Ubuntu:
$ sudo dpkg -i *.deb
- CentOS, Fedora and openSUSE:
$ sudo rpm -Uvh *.rpm
Set the PATH
In order to run perl6 by typing
perl6 instead of the full path
/opt/rakudo-pkg/bin/perl6 you’ll have to add the
directories to your
PATH. A script is supplied to do this automatically for
you. Run it as your regular user:
Alternatively, you can change the PATH manually. (Be aware that environment files start with a ‘.’ and are hidden by convention on graphical file browsers:
- For bourne derivated shells (like bash), add this to your
.bash_profileor the corresponding environment init script for your shell:
PATH=~/.perl6/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$PATH export PATH
- For zsh, add this to ~/.zshenv or ~/.zprofile, depending on your distribution:
path=(~/.perl6/bin /opt/rakudo-pkg/bin /opt/rakudo-pkg/share/perl6/site/bin $path[@])
Zef Module Manager as a Regular User
The installation supplies a working global Zef installation
/opt/rakudo-pkg/bin/zef). However, Rakudo takes a different
approach to many other languages (including Perl 5): modules are by default
installed the home directory of the user. A script is supplied to install
zef as a user. Zef will be installed to
~/.perl6/bin/zef and modules will
Windows Subsystem for Linux
If you’re using the Windows Subsystem for Linux (aka Bash or Ubuntu on Windows 10), use the repository or package for the installed Linux distribution. You’ll need to strip the moarvm library of (unused) kernel functionalities that Windows does not implement yet:
Using rakudo-pkg on Travis
You can use rakudo-pkg to speed-up the continuous integration of your Perl 6
module on Travis and other CI systems. Since this
package is going to be downloaded in the install phase, you don’t
need to specify a language (by default, it will install Ruby). Don’t
perl6 since this will download and build perl6 from source. Note
that rakudo-pkg does not exist for Precise Pangolin, so use trusty(default)
.travis.yml would include:
env: global: - export PATH="/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$PATH" addons: apt: sources: - sourceline: 'deb https://dl.bintray.com/nxadm/rakudo-pkg-debs $(lsb_release -cs) main' key_url: 'http://keyserver.ubuntu.com/pks/lookup?search=0x379CE192D401AB61&op=get' packages: - rakudo-pkg
After this line, you should do
zef install . && zef test . or whatever else you need to test your package. In case you need an specific version, older
versions are kept in the repository.
Building your Own Packages
If you prefer to build your own packages instead of the ones offered in the
releases tab, you can use the
images from the DockerHub. The
image name is
nxadm/rakudo-pkg while where every
image tag corresponds with
an specific OS-Release-Architecture combination. Alternatively, you can build
them with the Dockerfiles in the
Ubuntu 32-bit base images
Ubuntu does not release 32-bit base images. An script is supplied to build them from official sources.
$ bin/create-baseimg.p6 $ bin/create-baseimg.p6 <Ubuntu release> $ bin/create-baseimg.p6 18.04
Create a Package:
You need to supply the necessary environment variables to Docker:
$ docker run -ti --rm -v /var/tmp:/staging -e RAKUDO_VERSION=$RAKUDO_URL -e NQP_VERSION=$NQP_VERSION -e MOARVM_VERSION=$MOARVM_VERSION -e REVISION:$REVISION -e OS=$OS -e RELEASE=$RELEASE -e ARCH=$ARCH -e MAINTAINER=$MAINTAINER nxadm/rakudo-pkg:$TAG
Other Rakudo Distributions
What about packages provided by Operating Systems?
Our packages do not interfere with the packages included in Linux distributions and can be installed at the same time. Distribution packages that integrate with the Operating System are often a good choice. That said, Perl 6 reached language stability very recently. Packages that date from sources before December 2015 should be considered beta (Rakudo is a lot slower and some features where removed or added in the language). Perl 6 and Rakudo are evolving very fast, getting better and faster. So, often you’ll need a recent release to use these features.
This is the state of Rakudo packaged by the distribution themselves:
- Alpine 3.6: -
- Alpine 3.7: -
- Arch: 2018.06 (in the AUR)
- CentOS 7: -
- Debian 8: 2014.07 (avoid, predates the Christmas release)
- Debian 9: 2016.12 (avoid, predates the breaking IO changes)
- Fedora 26: 2017.08
- Fedora 27: 2017.08
- Fedora 28: 2018.02.1
- openSUSE 42.3: -
- Ubuntu 14.04: 2013.12 (avoid, predates the Christmas release)
- Ubuntu 16.04: 2015.11 (avoid, predates the Christmas release)
- Ubuntu 18.04: 2018.03
What about Rakudo Star?
Rakudo Star for Linux is certainly a
distribution for end-users worth exploring. It has a very different use case
in mind than
rakudo-pkg, however. While we concentrate on releasing
minimalistic, self-contained packages for every Rakudo release (monthly),
Rakudo Star releases quarterly and it includes a wide selection of third party
modules. On Linux, it does not provide binaries. Instead it locally compiles
the Rakudo compiler and the third party modules.
Issues (bugs and ideas) and PRs are always welcome. See CONTRIBUTING.md.