PageSourceSearch

https://raku.org/install

html raku.org collected 2026-10-02 02:56:30 UTC 17,867 bytes, 449 lines download raw bytes

1<!doctype html>
2<html data-theme="dark" lang="en">
3<head>
4<title>Raku®</title>
5<meta content="The Raku® programming language." name="description" />
6<meta charset="utf-8" />
7<meta content="width=device-width, initial-scale=1" name="viewport" />
8<script src="https://unpkg.com/[email protected]" integrity="sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO" crossorigin="anonymous"></script>
8
9
10<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
10
11
12<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/languages/haskell.min.js"></script>
12
13
14<script>
15            (function () {
16                const savedTheme = localStorage.getItem("theme");
17
18                let theme;
19                if (savedTheme) {
20                    theme = savedTheme;
21                } else {
22                    theme = window.matchMedia("(prefers-color-scheme: dark)").matches
23                        ? "dark"
24                        : "light";
25                }
26
27                document.documentElement.setAttribute("data-theme", theme);
28            })();
29        </script>
29
30
31<script defer data-website-id="bd5ca56b-3bad-47c7-b0a1-73ba5c3b5713" src="https://cloud.umami.is/script.js"></script>
31
32
33<link href="/img/favicon.ico" rel="icon" type="image/x-icon" />
34<link href="/css/styles.css" rel="stylesheet" />
35<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
36<style>.tab-menu {
37    display: block;
38    justify-content: left;
39}
40.tab-links {
41    display: block;
42}
43.tab-links > li.active > a {
44    text-decoration: underline;
45}
46
47@media (max-width: 768px) {
48    .tab-menu {
49        text-align: left;
50    }
51    .tab-links > * {
52        padding-top: 0;
53        padding-bottom:1em;
54    }
55}
56</style>
57
58<style>.tab-menu {
59    display: block;
60    justify-content: left;
61}
62.tab-links {
63    display: block;
64}
65.tab-links > li > a {
66    border-radius: var(--pico-border-radius);
67    border-top-left-radius: 0;
68    border-top-right-radius: 0;
69    background-color: transparent;
70    text-decoration: none;
71    cursor: pointer;
72    user-select: none;
73}
74.tab-links > li.active > a {
75    text-decoration: none;
76    border-bottom: var(--pico-border-width) solid var(--pico-primary-hover);
77}
78
79@media (max-width: 768px) {
80    .tab-menu {
81        text-align: center;
82    }
83    .tab-links > * {
84        padding-top: 0;
85        padding-bottom:1em;
86    }
87}
88</style>
89
90<style>dashboard {
91  display: flex;
92  flex-wrap: wrap;
93  justify-content: center;
94  gap: 1rem;
95}
96</style>
97
98<style>dashboard > article {
99  display: flex;
100  align-items: center;
101  flex-direction: column;
102
103  /* Responsive sizing */
104  flex: 1 1 600px;
105  max-width: 800px;
106
107  padding-left: 0.5rem !important;
108  padding-right: 0.5rem !important;
109  margin-top: 0 !important;
110}
111
112dashboard > article > header {
113  border-bottom-color: darkgray;
114  border-radius: 0px;
115}
116
117dashboard > article > footer {
118  border-top-color: darkgray;
119  border-radius: 0px;
120  margin-top: auto;
121}
122</style>
123
124<style>/* Custom styles for the hamburger menu */
125.menu {
126    display: none;
127    flex-direction: column;
128    gap: 10px;
129    position: absolute;
130    top: 60px;
131    right: 20px;
132    background: rgba(0, 0, 0, .95);
133    padding: 1rem;
134    border-radius: 8px;
135    box-shadow: 0 4px 6px rgba(128, 128, 128, .2);
136    z-index: 800;
137}
138
139.menu a {
140    display: block;
141}
142
143.menu.show {
144    display: flex;
145}
146
147.hamburger {
148    color: var(--pico-primary);
149    display: none;
150    cursor: pointer;
151    font-size: 2.5rem;
152    background: none;
153    border: none;
154    padding: 0.5rem;
155}
156
157@media (max-width: 768px) {
158    .hamburger {
159        display: block;
160    }
161
162    .nav-links {
163        display: none;
164    }
165}
166</style>
167</head>
168
169<body>
170<header class="container">
171<nav>
172<ul>
173<li class="logo">
174<span>
175<a target="_self" style="display: flex; align-items: center; gap: 0.5rem; text-decoration: none;" href="https://raku.org">
176<img title="Hi, my name is Camelia. I'm the spokesbug for the Raku Programming Language. Raku has been developed by a team of dedicated and enthusiastic open source volunteers, and continues to be developed. You can help too. The only requirement is that you know how to be nice to all kinds of people (and butterflies)." src="/img/camelia-logo.png" width="60px" />
177<p style="margin:0">Raku®</p>
178</a></span></li></ul>
179<ul hx-swap="outerHTML" class="nav-links" hx-target="#content">
180<li>
181<a href="/community">community</a></li>
182<li>
183<a href="/learn">learn</a></li>
184<li>
185<a href="/tools">tools</a></li>
186<li>
187<a rel="noopener noreferrer" target="_blank" href="https://docs.raku.org">docs</a></li>
188<li>
189<a target="_blank" href="https://raku.land" rel="noopener noreferrer">modules</a></li>
190<li>
191<a rel="noopener noreferrer" target="_blank" href="https://github.com/rakudo/rakudo">source</a></li>
192<li>
193<a href="/install">install</a></li>
194<li>
195                    <a style="font-variant-emoji: text" id ="sunIcon">&#9728;</a>
196                    <a style="font-variant-emoji: text" id ="moonIcon">&#9790;</a>
197                </li>
198</ul>
199<button id="hamburger" class="hamburger">&#9776;</button>
200<ul hx-target="#content" class="menu" hx-swap="outerHTML" id="menu">
201<li>
202<a href="/community">community</a></li>
203<li>
204<a href="/learn">learn</a></li>
205<li>
206<a href="/tools">tools</a></li>
207<li>
208<a target="_blank" href="https://docs.raku.org" rel="noopener noreferrer">docs</a></li>
209<li>
210<a target="_blank" href="https://raku.land" rel="noopener noreferrer">modules</a></li>
211<li>
212<a rel="noopener noreferrer" href="https://github.com/rakudo/rakudo" target="_blank">source</a></li>
213<li>
214<a href="/install">install</a></li>
215</ul>
216</nav></header>
217<main class="container">
218<div>
219<style>#background {
220    background: url('/img/Butterfly_bottom_PSF_transparent.gif');
221    top: 140px;
222    left: 0vw;
223    width: 100vw;
224    height: 360px;
225    background-size: auto;
226    opacity: 0.1;
227    filter: grayscale(100%);
228    transform: rotate(-9deg);
229    position: fixed;
230    background-repeat: no-repeat;
231    background-position: center top;
232    z-index: -1;
233    pointer-events: none;
234    padding: 20px;
235}
236</style>
237
238<div id="background"></div>
239</div>
240<div align="center" style="position: relative; padding: 20px;">
241<h1>Install Raku</h1>
242<div class="tabs">
243<nav class="tab-menu">
244<ul class="tab-links">
245<li class="active">
246<a hx-get="/tabs/1/Linux" hx-target="#tabs-1-content" data-value="1">Linux</a></li>
247<li class="">
248<a data-value="2" hx-target="#tabs-1-content" hx-get="/tabs/1/macOS">macOS</a></li>
249<li class="">
250<a hx-get="/tabs/1/Windows" data-value="3" hx-target="#tabs-1-content">Windows</a></li>
251<li class="">
252<a hx-get="/tabs/1/Docker" hx-target="#tabs-1-content" data-value="4">Docker</a></li>
253</ul></nav>
254<div id="tabs-1-content">
255<div align="left" class="tab">
256<div>
257<h1>Linux</h1><p>Other download and installation <a href="/tools">options</a> are available.</p><p>Rakubrew is a Raku installation tool. It allows you to have multiple versions of different Raku implementations installed in parallel and switch between them. It's a <a href="https://perlbrew.pl/">perlbrew</a> and <a href="https://github.com/tokuhirom/plenv">plenv</a> look alike and supports both flavours of commands.</p><h2>Installation</h2><p>
257Just copy and paste the following piece of code into a console.</p><pre><code>curl https://rakubrew.org/install-on-perl.sh | sh</code></pre><h2>Bare Bones Installation</h2><p>If the above installation script somehow doesn't work for you, you can install Rakubrew manually.</p><p>First download the Rakubrew executable:</p><pre><code>https://rakubrew.org/perl/rakubrew</code></pre><p>Then give that file executable permissions:</p><pre><code>chmod +x rakubrew</code></pre><p>Add the Rakubrew and shim folders to your <code>PATH</code>:</p><pre><code># Bash &amp; ZSH
258export PATH=/path/where/rakubrew/is:$PATH
259export PATH=$(rakubrew home)/shims:$PATH</code></pre><pre><code># Fish
260fish_add_path -g /path/where/rakubrew/is
261fish_add_path -g (rakubrew home)/shims</code></pre><p>Finally run</p><pre><code>rakubrew mode shim</code></pre><p>That's all!</p><h3>Shell Hook</h3><p>If you want to use <code>env</code> mode, the <code>shell</code> command or have auto-completion, you need to install the shell hook. To get the instructions on how to do that type</p><pre><code>rakubrew init</code></pre><h3>Installation Path</h3><p>To make Rakubrew use a different directory to store its files set the <code>RAKUBREW_HOME</code> environment variable prior to calling it. Put the following into your <code>.bashrc</code> or similar:</p><pre><code>export RAKUBREW =~/rakubrew # or some other path</code></pre><h2>How</h2><pre><code># list available versions
262rakubrew available</code></pre><pre><code># download and install the latest Rakudo on MoarVM version
263rakubrew download</code></pre><pre><code># switch to use that version (substitute the version you just installed)
264rakubrew switch moar-2025.05</code></pre><pre><code>raku -e &#39;say &quot;Now running &#123;$*RAKU.compiler.version&#125;!&quot;&#39;</code></pre><h2>Global, Shell, Local</h2><p>Rakubrew knows three different versions that can be set separately.</p><p>The <code>global</code> version is the one that is selected when neither the <code>shell</code> version nor the <code>local</code> version are active.</p><p>The <code>shell</code> version changes the active raku version just in the current shell. Closing the current shell also looses the <code>shell</code> version.</p><p>The <code>local</code> version is specific to a folder. When CWD is in that folder or a sub folder that version of raku is used. Only works in <code>shim</code> mode. To unset a local version one must delete the <code>.RAKU_VERSION</code> file in the respective folder.</p><h2>Modes</h2><p>Rakubrew can work in two distinct modes: <code>env</code> and <code>shim</code></p><p>In <code>env</code> mode Rakubrew modifies the <code>$PATH</code> variable as needed when switching between versions. This is neat because one then runs the executables directly. This is the default mode on *nix.</p><p>In <code>shim</code> mode Rakubrew generates wrapper scripts called shims for all executables it can find in all the different raku installations. These shims forward to the actual executable when called. This mechanism allows for some advanced features, such as local versions. When installing a module that adds scripts one must make Rakubrew aware of these new scripts. This is done with</p><pre><code>rakubrew rehash</code></pre><p>In <code>env</code> mode this is not necessary.</p><h2>Registering External Versions</h2><p>To add a raku installation to Rakubrew that was created outside of Rakubrew one should do:</p><pre><code>rakubrew register name-of-version /path/to/raku/install/directory</code></pre><h2>Upgrading</h2><pre><code>rakubrew self-upgrade</code></pre><h2>Uninstall</h2><p>To remove Rakubrew and any raku implementations it has installed on your system, delete the  <code>~/.rakubrew</code> and <code>~/.local/share/rakubrew</code> directories.</p><h1>Further Info</h1><p>More information on Rakubrew is available <a href="https://rakubrew.org/">here</a>.</p>
265</div></div></div>
266</div>
267</div>
268</main>
269<footer class="container">
270<hr />
271<p>
272            Hypered with <a href="https://htmx.org" target="_blank">htmx</a>.
273            Aloft on <a href="https://harcstack.org" target="_blank"><b>&Aring;ir</b></a>.
274            Constructed in <a href="https://cro.raku.org" target="_blank">cro</a>.
275            Written in <a href="https://raku.org" target="_blank">raku</a>.
276            &nbsp;&amp;&nbsp;
277            Styled by <a href="https://picocss.com" target="_blank">picocss</a>.
278        </p>
279<p>Please report any issues with this site at <a href="https://github.com/Raku/raku.org" target="_blank">Raku/raku.org</a>.</p>
280<p>The Raku® Programming Language</p>
281</footer>
282<script>    // Hilite-helper.js
283
284    function copyCode() {
285        // copy code block to clipboard adapted from solution at
286        // https://stackoverflow.com/questions/34191780/javascript-copy-string-to-clipboard-as-text-html
287        // if behaviour problems with different browsers add stylesheet code from that solution.
288        const copyButtons = Array.from(document.querySelectorAll('.copy-code'));
289        copyButtons.forEach( function( button ) {
290        // this works with / without label
291        var codeElement = button.nextElementSibling;
292        while (codeElement && codeElement.tagName !== 'DIV') {
293          codeElement = codeElement.nextElementSibling;
294        }
295        button.addEventListener( 'click', function(insideButton) {
296            var container = document.createElement('div');
297            container.innerHTML = codeElement.innerHTML;
298                container.style.position = 'fixed';
299                container.style.pointerEvents = 'none';
300                container.style.opacity = 0;
301                document.body.appendChild(container);
302                window.getSelection().removeAllRanges();
303                var range = document.createRange();
304                range.selectNode(container);
305                window.getSelection().addRange(range);
306                document.execCommand("copy", false);
307                document.body.removeChild(container);
308            });
309        });
310    }
311
312    // DOM ready
313    document.addEventListener('DOMContentLoaded', function () {
314        // trigger the highlighter for non-Raku code
315        copyCode();
316        hljs.highlightAll();
317    });
318
319    // HTMX updates
320    document.addEventListener('htmx:afterSwap', function () {
321        copyCode();
322        hljs.highlightAll();
323    });
324</script>
324
325
326<script>function setupTabLinks() {
327    const links = document.querySelectorAll('.tab-links > *');
328    const hiddenInput = document.getElementById('selectedOption');
329    const display = document.getElementById('selectedDisplay');
330
331    links.forEach(link => {
332        link.addEventListener('click', function (e) {
333            e.preventDefault();
334
335            links.forEach(l => l.classList.remove('active'));
336
337            this.classList.add('active');
338
339            const value = this.getAttribute('data-value');
340            if (hiddenInput) hiddenInput.value = value;
341            if (display) display.textContent = `Selected: ${this.textContent}`;
342        });
343    });
344}
345
346// Run on initial load
347document.addEventListener('DOMContentLoaded', setupTabLinks);
348
349// Re-run after HTMX swaps in new content
350document.body.addEventListener('htmx:afterSwap', setupTabLinks);
351</script>
351
352
353<script>function setupTabLinks() {
354    const links = document.querySelectorAll('.tab-links > *');
355    const hiddenInput = document.getElementById('selectedOption');
356    const display = document.getElementById('selectedDisplay');
357
358    links.forEach(link => {
359        link.addEventListener('click', function (e) {
360            e.preventDefault();
361
362            links.forEach(l => l.classList.remove('active'));
363
364            this.classList.add('active');
365
366            const value = this.getAttribute('data-value');
367            if (hiddenInput) hiddenInput.value = value;
368            if (display) display.textContent = `Selected: ${this.textContent}`;
369        });
370    });
371}
372
373// Run on initial load
374document.addEventListener('DOMContentLoaded', setupTabLinks);
375
376// Re-run after HTMX swaps in new content
377document.body.addEventListener('htmx:afterSwap', setupTabLinks);
378</script>
378
379
380<script>
381            // Show/hide icons
382            function updateIcons(theme) {
383                if (theme === "dark") {
384                    sunIcon.style.display = "none";
385                    moonIcon.style.display = "block";
386                } else {
387                    sunIcon.style.display = "block";
388                    moonIcon.style.display = "none";
389                }
390            }
391            function setTheme(mode) {
392        const htmlElement = document.documentElement;
393        let newTheme = mode;
394
395        if (mode === "toggle") {
396            const currentTheme = htmlElement.getAttribute("data-theme") || "light";
397            newTheme = currentTheme === "dark" ? "light" : "dark";
398        } else if (mode === "system") {
399            newTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
400        }
401
402        htmlElement.setAttribute("data-theme", newTheme);
403        localStorage.setItem("theme", newTheme); // Save theme to localStorage
404        updateIcons(newTheme);
405    }
406
407    // update icons on page load
408    document.addEventListener("DOMContentLoaded", () => {
409        const theme = document.documentElement.getAttribute("data-theme");
410        updateIcons(theme);
411    });
412
413    // Listen for system dark mode changes and update the theme dynamically
414    window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
415        setTheme("system"); // Follow system setting
416    });
417
418            // Attach to icon click
419            const sunIcon  = document.getElementById("sunIcon");
420            const moonIcon = document.getElementById("moonIcon");
421
422            document.getElementById("sunIcon").addEventListener("click", () => setTheme("dark"));
423            document.getElementById("moonIcon").addEventListener("click", () => setTheme("light"));
424        </script>
424
425
426<script>const hamburger = document.getElementById('hamburger');
427const menu = document.getElementById('menu');
428
429if (hamburger && menu) {
430    hamburger.addEventListener('click', () => {
431        menu.classList.toggle('show');
432    });
433
434    document.addEventListener('click', (e) => {
435        if (!menu.contains(e.target) && !hamburger.contains(e.target)) {
436            menu.classList.remove('show');
437        }
438    });
439}
440
441// Hide the menu when resizing the viewport to a wider width
442window.addEventListener('resize', () => {
443    if (menu && window.innerWidth > 768) {
444        menu.classList.remove('show');
445    }
446});
447</script>
447
448</body>
449</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.