<?xml version="1.0" encoding="UTF-8" ?>
<!-- RSS generated by PHPBoost on Mon, 18 May 2026 13:35:31 +0200 -->
<rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Wiki]]></title>
		<atom:link href="https://www.mageialinux-online.org/syndication/rss/wiki/49" rel="self" type="application/rss+xml"/>
		<link>https://www.mageialinux-online.org</link>
		<description><![CDATA[Derniers articles de la catégorie Divers]]></description>
		<copyright>(C) 2005-2026 PHPBoost</copyright>
		<language>fr</language>
		<generator>PHPBoost</generator>
		
            <item>
                <title><![CDATA[Installer utop sur Mageia 6]]></title>
                <link>https://www.mageialinux-online.org/wiki/installer-utop-sur-mageia-6</link>
                <guid>https://www.mageialinux-online.org/wiki/installer-utop-sur-mageia-6</guid>
                <description><![CDATA[<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-installer-utop-sur-mageia">Installer utop sur Mageia</h2><br />

<span class="message-helper bgc warning">Rédigé pour Mageia 6. Mis à jour pour Mageia 9.</span><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-introduction">Introduction</h3><br />

<br />
utop est un interpréteur ( un toplevel ; utop c'est Universal Toplevel ) pour le langage de programmation <a class="offload" href="https://caml.inria.fr/ocaml/index.fr.html">OCaml</a> qu'on peut lancer dans un terminal.<br />
ocaml est l&#8217;interpréteur par défaut, mais malheureusement il est franchement sommaire.<br />
 <div class="formatter-container formatter-code code-TEXT"><span class="formatter-title">Code TEXT : </span><div class="formatter-content"><pre style="display:inline;"><pre class="text" style="font-family:monospace;">ocaml
        OCaml version 4.14.0
# 5+6;;
- : int = 11
# 45 + 8;;
- : int = 53
# ^[[A</pre></pre></div></div><br />
Voilà ce qu'on obtient, dernière ligne, en essayant de rappeler la commande précédente avec la touche <<span class="emoji-tag">&uarr;</span>>.<br />
<br />
utop est plus souple , et plus coloré.<br />
<br />
<p style="text-align: center;"><img src="https://www.mageialinux-online.org/upload/screenshot_20170901_002150.png" alt="screenshot_20170901_002150" /></p><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-installation">Installation</h3><br />

<br />
<h4 class="formatter-title wiki-paragraph-4" id="paragraph-utop-est-dans-les-depots">utop est dans les dépôts</h4><br />

Mais ça ne fonctionne pas. L'installation de passe bien, mais<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">$ utop
Fatal error: cannot load shared library dlllambda-term_stubs
Reason: dlllambda-term_stubs.so: cannot open shared object file: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory</pre></pre></div></div><br />
Le <a class="offload" href="https://bugs.mageia.org/show_bug.cgi?id=21317">bug est déclaré</a>, mais il n'y a plus de mainteneur, actuellement, pour les rpm OCaml.<br />
<a class="offload" href="https://www.mageialinux-online.org/forum/topic-24020+bug-dans-utop-e.php">Le post du forum</a> en rapport avec ce problème.<br />
<br />
<h4 class="formatter-title wiki-paragraph-4" id="paragraph-installation-sans-les-depots">Installation sans les dépôts</h4><br />

Voici une méthode non exclusive d'une autre a priori. Je présente ici un tutoriel issu d'une démarche empirique.<br />
D'autres démarches peuvent fonctionner ou pas.<br />
Pour résumer voici comment j'ai obtenu utop sous mageia 6.<br />
<br />
<h5 class="formatter-title wiki-paragraph-5" id="paragraph-installer-opam">Installer opam</h5><br />

opam est un gestionnaire de paquets pour OCaml, comme l'est pip (ou pip3) pour python (pour python 3).<br />
Pas de problèmes, il est dans les rpm Mageia 6 (et 9). Donc<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;"># </span>urpmi opam</pre></pre></div></div><br />
Il faut ensuite le paramètrer (commande, et messages) :<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span>opam init</pre></pre></div></div><br />
<div class="formatter-container formatter-hide no-js"><span class="formatter-title">Caché :</span><div class="formatter-content"><div class="formatter-container formatter-block">$ opam init<br />
OPAM has already been initialized.<br />
In normal operation, OPAM only alters files within ~/.opam.<br />
During this initialisation, you can allow OPAM to add information to two<br />
other files for best results. You can also make these additions manually<br />
if you wish.<br />
If you agree, OPAM will modify:<br />
  - ~/.bash_profile (or a file you specify) to set the right environment<br />
    variables and to load the auto-completion scripts for your shell (bash)<br />
    on startup. Specifically, it checks for and appends the following line:<br />
    . /home/dom/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true<br />
  - ~/.ocamlinit to ensure that non-system installations of `ocamlfind`<br />
    (i.e. those installed by OPAM) will work correctly when running the<br />
    OCaml toplevel. It does this by adding $OCAML_TOPLEVEL_PATH to the list<br />
    of include directories.<br />
If you choose to not configure your system now, you can either configure<br />
OPAM manually (instructions will be displayed) or launch the automatic setup<br />
later by running:<br />
   opam config setup -a<br />
Do you want OPAM to modify ~/.bash_profile and ~/.ocamlinit?<br />
(default is 'no', use 'f' to name a file other than ~/.bash_profile)<br />
    [N/y/f] </div></div></div><br />
Choisissez <strong>Yes</strong>.<br />
<h5 class="formatter-title wiki-paragraph-5" id="paragraph-installer-utop-via-opam">Installer utop via opam</h5><br />

On doit pouvoir installer utop à l'aide d'opam.<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">opam <span style="color: #c20cb9; font-weight: bold;">install</span> utop</pre></pre></div></div><br />
Mais, ça n'a pas fonctionné pour moi. J'ai l'erreur<br />
<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ERROR<span style="color: #7a0874; font-weight: bold;">&#93;</span> The compilation of ocamlfind failed at <span style="color: #ff0000;">"make all"</span>.</pre></pre></div></div><br />
Une erreur sur ocamlfind très connue de Google.<br />
<br />
Pour info, voici ce vous installez avec utop, si vous ne rencontrez pas ce bug.<br />
<div class="formatter-container formatter-hide no-js"><span class="formatter-title">Caché :</span><div class="formatter-content"><div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">$ opam <span style="color: #c20cb9; font-weight: bold;">install</span> utop          
The following actions will be performed:
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> base-ocamlbuild base             <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by ocamlbuild<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> conf-m4         <span style="color: #000000;">1</span>                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by ocamlfind<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> result          <span style="color: #000000;">1.2</span>              <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by lwt<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> ocamlbuild      <span style="color: #000000;">0</span>                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by cppo, lambda-term<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> ocamlfind       1.7.3            <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> topkg           0.9.0            <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by react<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> ppx_tools       <span style="color: #000000;">5.0</span>+4.02.0       <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by lwt<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> jbuilder        <span style="color: #000000;">1.0</span>+beta12       <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> cppo            1.4.0            <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> react           1.2.1            <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> camomile        0.8.5            <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by zed<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> lwt             2.7.1            <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
       For module Lwt_react, please <span style="color: #c20cb9; font-weight: bold;">install</span> package lwt_react
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> zed             <span style="color: #000000;">1.3</span>              <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by lambda-term<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> lambda-term     1.10.1           <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> utop            2.0.1     
===== ∗  <span style="color: #000000;">15</span> =====
Do you want to <span style="color: #7a0874; font-weight: bold;">continue</span> ? <span style="color: #7a0874; font-weight: bold;">&#91;</span>Y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span> y
&nbsp;</pre></pre></div></div></div></div><br />
<br />
<h5 class="formatter-title wiki-paragraph-5" id="paragraph-autre-demarche">Autre démarche</h5><br />

J'ai contourné le problème ci dessus avec <div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">opam switch <span style="color: #c20cb9; font-weight: bold;">install</span> 4.02.1</pre></pre></div></div><br />
<span class="message-helper bgc warning">Au 05/09/2024, on peut choisir la version 5.1.1</span><br />
Qui retrourne<div class="formatter-container formatter-hide no-js"><span class="formatter-title">Caché :</span><div class="formatter-content"><div class="formatter-container formatter-block">=-=- Installing compiler 4.02.1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<br />
[default.comp] <a class="offload" href="http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.1.tar.gz">http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.1.tar.gz</a> downloaded<br />
Now compiling OCaml. This may take a while, please bear with us...<br />
Done.<br />
<br />
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<br />
<br />
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<br />
<span class="emoji-tag">&lowast;</span>  installed base-bigarray.base<br />
<span class="emoji-tag">&lowast;</span>  installed base-ocamlbuild.base<br />
<span class="emoji-tag">&lowast;</span>  installed base-threads.base<br />
<span class="emoji-tag">&lowast;</span>  installed base-unix.base<br />
Done.<br />
# To setup the new switch in the current shell, you need to run:<br />
eval `opam config env`</div></div></div><br />
Par conséquent<div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span><span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #000000; font-weight: bold;">`</span>opam config <span style="color: #c20cb9; font-weight: bold;">env</span><span style="color: #000000; font-weight: bold;">`</span></pre></pre></div></div><br />
<br />
On installe maintenant utop :<br />
<div class="formatter-container formatter-hide no-js"><span class="formatter-title">Caché :</span><div class="formatter-content"><div class="formatter-container formatter-code code-BASH"><span class="formatter-title">Code BASH : </span><div class="formatter-content"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">$ opam <span style="color: #c20cb9; font-weight: bold;">install</span> utop     
The following actions will be performed:
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> ocamlbuild  <span style="color: #000000;">0</span>                    <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> conf-m4     <span style="color: #000000;">1</span>                    <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by ocamlfind<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> result      <span style="color: #000000;">1.2</span>                  <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by lwt<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> ocamlfind   1.7.3                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> topkg       0.9.0                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by react<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> ppx_tools   <span style="color: #000000;">5.0</span>+4.02.0           <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by lwt<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> cppo        1.4.0                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> react       1.2.1                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> camomile    0.8.5                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by zed<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> lwt         2.7.1                <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
       For module Lwt_react, please <span style="color: #c20cb9; font-weight: bold;">install</span> package lwt_react
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> zed         <span style="color: #000000;">1.3</span>                  <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by lambda-term<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> lambda-term 1.10.1               <span style="color: #7a0874; font-weight: bold;">&#91;</span>required by utop<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  ∗  <span style="color: #c20cb9; font-weight: bold;">install</span> utop        1.19.3    
===== ∗  <span style="color: #000000;">13</span> =====
Do you want to <span style="color: #7a0874; font-weight: bold;">continue</span> ? <span style="color: #7a0874; font-weight: bold;">&#91;</span>Y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span> y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<span style="color: #7a0874; font-weight: bold;">&#91;</span>camomile<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>cppo<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>lambda-term<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>lwt<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>ocamlfind<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>ppx_tools<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>react<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>topkg<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>zed<span style="color: #7a0874; font-weight: bold;">&#93;</span> Archive <span style="color: #000000; font-weight: bold;">in</span> cache
<span style="color: #7a0874; font-weight: bold;">&#91;</span>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> https:<span style="color: #000000; font-weight: bold;">//</span>opam.ocaml.org<span style="color: #000000; font-weight: bold;">/</span>archives<span style="color: #000000; font-weight: bold;">/</span>result.1.2+opam.tar.gz downloaded
<span style="color: #7a0874; font-weight: bold;">&#91;</span>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> https:<span style="color: #000000; font-weight: bold;">//</span>opam.ocaml.org<span style="color: #000000; font-weight: bold;">/</span>archives<span style="color: #000000; font-weight: bold;">/</span>utop.1.19.3+opam.tar.gz downloaded
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗  installed ocamlbuild.0
∗  installed conf-m4.1
∗  installed result.1.2
∗  installed ocamlfind.1.7.3
∗  installed cppo.1.4.0
∗  installed ppx_tools.5.0+4.02.0
∗  installed topkg.0.9.0
∗  installed react.1.2.1
∗  installed lwt.2.7.1
∗  installed camomile.0.8.5
∗  installed zed.1.3
∗  installed lambda-term.1.10.1
∗  installed utop.1.19.3
Done.
&nbsp;</pre></pre></div></div></div></div><br />
Et cette fois, c'est la bonne !<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-confession">Confession</h2><br />

<br />
Je n'ai pas recherché les causes des différents bugs.<br />
Et je confesse que je ne vous propose aucune explication ou solution aux bugs rencontrés. Ni pour le bug du package Mageia, ni pour le bug ocamlfind.<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-webographie">Webographie</h2><br />

<ul class="formatter-ul">
    <li class="formatter-li"><a class="offload" href="https://opam.ocaml.org/blog/about-utop/">UTop: a much improved interface to the OCaml toplevel</a>
    </li><li class="formatter-li"><a class="offload" href="https://github.com/ocaml/opam/issues/1671">Page où j'ai trouvé la méthode</a> <em>Autre démarche.</em>
    </li><li class="formatter-li"><a class="offload" href="https://caml.inria.fr/pub/distrib/">Dépots Ocaml de l'INRIA</a><br />
</li></ul><br />
<br />
<p style="text-align: right;"><a class="offload" href="https://www.mageialinux-online.org/user/profile/5813">Meuz</a>, le 31/08/17. MaJ le 05/09/24</p><br />]]></description>
                <pubDate>Thu, 05 Sep 2024 16:07:42 +0200</pubDate>
                
            </item>
		
            <item>
                <title><![CDATA[Divers]]></title>
                <link>https://www.mageialinux-online.org/wiki/divers</link>
                <guid>https://www.mageialinux-online.org/wiki/divers</guid>
                <description><![CDATA[Section destinée à tout ce qui n'est pas facilement catégorisable.]]></description>
                <pubDate>Thu, 31 Aug 2017 22:15:01 +0200</pubDate>
                
            </item>
		
	</channel>
</rss>
