<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://agora.nasqueron.org/index.php?action=history&amp;feed=atom&amp;title=Fr</id>
	<title>Fr - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://agora.nasqueron.org/index.php?action=history&amp;feed=atom&amp;title=Fr"/>
	<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Fr&amp;action=history"/>
	<updated>2026-04-15T00:59:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0-alpha</generator>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Fr&amp;diff=2183&amp;oldid=prev</id>
		<title>Ptdradmin: Created page with &quot;= Documentation - Résolution d&#039;erreur de build Anubis =  == Contexte == Installation et configuration d’&#039;&#039;&#039;Anubis Web AI Firewall&#039;&#039;&#039; sur un serveur &#039;&#039;&#039;Red Hat Enterprise Linux 10 (RHEL 10)&#039;&#039;&#039;.  * &#039;&#039;&#039;Serveur :&#039;&#039;&#039; dwellers.nasqueron.org * &#039;&#039;&#039;Utilisateur :&#039;&#039;&#039; ptdradmin * &#039;&#039;&#039;Répertoire d’installation :&#039;&#039;&#039; /opt/anubis  &#039;&#039;&#039;Versions des outils :&#039;&#039;&#039; * Go : 1.25.3 * Node.js : 22.16.0 * npm : 10.9.2 * esbuild : 0.27.2  == Problème rencontré == === Symptômes === # Échec d...&quot;</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Fr&amp;diff=2183&amp;oldid=prev"/>
		<updated>2025-12-18T10:16:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Documentation - Résolution d&amp;#039;erreur de build Anubis =  == Contexte == Installation et configuration d’&amp;#039;&amp;#039;&amp;#039;Anubis Web AI Firewall&amp;#039;&amp;#039;&amp;#039; sur un serveur &amp;#039;&amp;#039;&amp;#039;Red Hat Enterprise Linux 10 (RHEL 10)&amp;#039;&amp;#039;&amp;#039;.  * &amp;#039;&amp;#039;&amp;#039;Serveur :&amp;#039;&amp;#039;&amp;#039; dwellers.nasqueron.org * &amp;#039;&amp;#039;&amp;#039;Utilisateur :&amp;#039;&amp;#039;&amp;#039; ptdradmin * &amp;#039;&amp;#039;&amp;#039;Répertoire d’installation :&amp;#039;&amp;#039;&amp;#039; /opt/anubis  &amp;#039;&amp;#039;&amp;#039;Versions des outils :&amp;#039;&amp;#039;&amp;#039; * Go : 1.25.3 * Node.js : 22.16.0 * npm : 10.9.2 * esbuild : 0.27.2  == Problème rencontré == === Symptômes === # Échec d...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Documentation - Résolution d&amp;#039;erreur de build Anubis =&lt;br /&gt;
&lt;br /&gt;
== Contexte ==&lt;br /&gt;
Installation et configuration d’&amp;#039;&amp;#039;&amp;#039;Anubis Web AI Firewall&amp;#039;&amp;#039;&amp;#039; sur un serveur &amp;#039;&amp;#039;&amp;#039;Red Hat Enterprise Linux 10 (RHEL 10)&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Serveur :&amp;#039;&amp;#039;&amp;#039; dwellers.nasqueron.org&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Utilisateur :&amp;#039;&amp;#039;&amp;#039; ptdradmin&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Répertoire d’installation :&amp;#039;&amp;#039;&amp;#039; /opt/anubis&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Versions des outils :&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Go : 1.25.3&lt;br /&gt;
* Node.js : 22.16.0&lt;br /&gt;
* npm : 10.9.2&lt;br /&gt;
* esbuild : 0.27.2&lt;br /&gt;
&lt;br /&gt;
== Problème rencontré ==&lt;br /&gt;
=== Symptômes ===&lt;br /&gt;
# Échec de la génération de code (&amp;lt;code&amp;gt;go generate ./...&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Permissions refusées lors de la création de fichiers&lt;br /&gt;
* Messages : &amp;lt;code&amp;gt;permission denied&amp;lt;/code&amp;gt;&lt;br /&gt;
* Erreur : &amp;lt;code&amp;gt;./build.sh: line 48: esbuild: command not found&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Échec de la compilation (&amp;lt;code&amp;gt;go build&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Le binaire &amp;lt;code&amp;gt;/opt/anubis/var/anubis&amp;lt;/code&amp;gt; n&amp;#039;a pas été créé&lt;br /&gt;
* Erreur : &amp;lt;code&amp;gt;pattern static/app.js: no matching files found&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Échec du démarrage du service systemd&lt;br /&gt;
* Service anubis ne peut pas démarrer&lt;br /&gt;
* Erreur : &amp;lt;code&amp;gt;Unable to locate executable &amp;#039;/usr/bin/anubis&amp;#039;: No such file or directory&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Erreurs détaillées ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
go generate ./...&lt;br /&gt;
&lt;br /&gt;
stringer: writing output: open droneblresponse_string.go: permission denied&lt;br /&gt;
(✗) Error [ error=failed to generate code for &amp;quot;/opt/anubis/internal/honeypot/naive/page.templ&amp;quot;: &lt;br /&gt;
    failed to write target file &amp;quot;/opt/anubis/internal/honeypot/naive/page_templ.go&amp;quot;: &lt;br /&gt;
    open /opt/anubis/internal/honeypot/naive/page_templ.go: permission denied ]&lt;br /&gt;
mkdir: cannot create directory &amp;#039;static/js&amp;#039;: Permission denied&lt;br /&gt;
./build.sh: line 48: esbuild: command not found&lt;br /&gt;
lib/challenge/preact/preact.go:20: running &amp;quot;./build.sh&amp;quot;: exit status 127&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
go build -o var/anubis cmd/anubis/main.go&lt;br /&gt;
&lt;br /&gt;
lib/challenge/preact/preact.go:23:12: pattern static/app.js: no matching files found&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl status anubis&lt;br /&gt;
&lt;br /&gt;
× anubis.service - Anubis Web AI Firewall&lt;br /&gt;
     Active: failed (Result: exit-code)&lt;br /&gt;
    Process: 821872 ExecStart=/usr/bin/anubis (code=exited, status=203/EXEC)&lt;br /&gt;
&lt;br /&gt;
anubis.service: Unable to locate executable &amp;#039;/usr/bin/anubis&amp;#039;: No such file or directory&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Analyse de la cause racine ==&lt;br /&gt;
=== Causes principales ===&lt;br /&gt;
* Conflit de permissions dû à l&amp;#039;utilisation de &amp;lt;code&amp;gt;sudo git clone&amp;lt;/code&amp;gt;&lt;br /&gt;
* Outil &amp;#039;&amp;#039;esbuild&amp;#039;&amp;#039; manquant dans le PATH lors de l’exécution de &amp;lt;code&amp;gt;build.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conséquences en cascade ===&lt;br /&gt;
* Génération incomplète : fichiers de code généré non créés&lt;br /&gt;
* esbuild non trouvé : bundler JavaScript inaccessible&lt;br /&gt;
* Assets manquants : fichiers JS comme &amp;lt;code&amp;gt;static/app.js&amp;lt;/code&amp;gt; non générés&lt;br /&gt;
* Compilation impossible&lt;br /&gt;
* Binaire absent : /usr/bin/anubis inexistant&lt;br /&gt;
* Service systemd en échec&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
&amp;lt;folding summary=&amp;quot;Cliquez pour dérouler les étapes complètes de résolution&amp;quot;&amp;gt;&lt;br /&gt;
=== Étape 1 : Arrêter le service en échec ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl stop anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 2 : Installer esbuild globalement ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo npm install -g esbuild&lt;br /&gt;
which esbuild&lt;br /&gt;
esbuild --version&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 3 : Corriger la propriété des fichiers ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown -R ptdradmin:ptdradmin /opt/anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 4 : Nettoyer les artéfacts de build partiels ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /opt/anubis&lt;br /&gt;
rm -rf bin var&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 5 : Générer le code sans sudo ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
go generate ./...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* La génération doit se terminer avec succès et produire les fichiers JS :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
(✓) Complete [ updates=0 duration=2.753344ms ]&lt;br /&gt;
(✓) Complete [ updates=0 duration=4.775691ms ]&lt;br /&gt;
app.js&lt;br /&gt;
  static/app.js  20.3kb&lt;br /&gt;
⚡ Done in 12ms&lt;br /&gt;
(✓) Complete [ updates=0 duration=2.333324ms ]&lt;br /&gt;
(✓) Complete [ updates=0 duration=3.490825ms ]&lt;br /&gt;
(✓) Complete [ updates=0 duration=14.668559ms ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 6 : Compiler le binaire ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
go build -o var/anubis cmd/anubis/main.go&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 7 : Vérifier la création du binaire ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls -l var/anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Exemple attendu :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
-rwxr-xr-x. 1 ptdradmin ptdradmin 52659096 Dec 17 14:46 var/anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 8 : Copier le binaire vers /usr/bin ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo cp var/anubis /usr/bin/anubis&lt;br /&gt;
sudo chmod 755 /usr/bin/anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 9 : Vérifier l&amp;#039;installation ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/usr/bin/anubis --version&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Exemple attendu : &amp;lt;code&amp;gt;Anubis devel&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 10 : Démarrer le service ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl start anubis&lt;br /&gt;
sudo systemctl status anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Statut attendu :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
● anubis.service - Anubis Web AI Firewall&lt;br /&gt;
     Loaded: loaded (/etc/systemd/system/anubis.service; enabled; preset: disabled)&lt;br /&gt;
     Active: active (running) since Wed 2025-12-17 14:46:41 UTC; 6s ago&lt;br /&gt;
   Main PID: 823482 (anubis)&lt;br /&gt;
      Tasks: 13 (limit: 203296)&lt;br /&gt;
     Memory: 15.5M (peak: 18.7M)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Étape 11 : Commandes complètes de séquence ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arrêter le service&lt;br /&gt;
sudo systemctl stop anubis&lt;br /&gt;
&lt;br /&gt;
# S&amp;#039;assurer que esbuild est installé&lt;br /&gt;
sudo npm install -g esbuild&lt;br /&gt;
which esbuild&lt;br /&gt;
esbuild --version&lt;br /&gt;
&lt;br /&gt;
# Corriger la propriété&lt;br /&gt;
sudo chown -R ptdradmin:ptdradmin /opt/anubis&lt;br /&gt;
&lt;br /&gt;
# Nettoyer et reconstruire&lt;br /&gt;
cd /opt/anubis&lt;br /&gt;
rm -rf bin var&lt;br /&gt;
go generate ./...&lt;br /&gt;
go build -o var/anubis cmd/anubis/main.go&lt;br /&gt;
&lt;br /&gt;
# Vérifier et installer&lt;br /&gt;
ls -l var/anubis&lt;br /&gt;
sudo cp var/anubis /usr/bin/anubis&lt;br /&gt;
sudo chmod 755 /usr/bin/anubis&lt;br /&gt;
&lt;br /&gt;
# Tester et démarrer&lt;br /&gt;
/usr/bin/anubis --version&lt;br /&gt;
sudo systemctl start anubis&lt;br /&gt;
sudo systemctl status anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/folding&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bonnes pratiques ==&lt;br /&gt;
* Ne pas utiliser &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; pour &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt;&lt;br /&gt;
* Installer tous les outils nécessaires globalement avant le build&lt;br /&gt;
* Séparer les opérations utilisateur et root (build vs installation)&lt;br /&gt;
* Vérifier les permissions avant de lancer le build&lt;br /&gt;
* Utiliser &amp;lt;code&amp;gt;make build&amp;lt;/code&amp;gt; si disponible&lt;br /&gt;
&lt;br /&gt;
== Structure de répertoires recommandée ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
/opt/anubis/          # Code source (propriétaire: utilisateur)&lt;br /&gt;
  ├── cmd/&lt;br /&gt;
  ├── internal/&lt;br /&gt;
  ├── lib/&lt;br /&gt;
  └── var/&lt;br /&gt;
      └── anubis      # Binaire compilé&lt;br /&gt;
&lt;br /&gt;
/usr/bin/anubis       # Installation système (root)&lt;br /&gt;
/etc/anubis/          # Configuration (root)&lt;br /&gt;
  ├── site.env&lt;br /&gt;
  └── site.botPolicies.yaml&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vérifications post-installation ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl status anubis&lt;br /&gt;
sudo journalctl -u anubis -n 50&lt;br /&gt;
sudo journalctl -u anubis -f&lt;br /&gt;
sudo ss -tulpn | grep anubis&lt;br /&gt;
sudo systemctl restart anubis&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Résumé ==&lt;br /&gt;
* Problèmes : permissions incorrectes et esbuild manquant&lt;br /&gt;
* Solutions : installer esbuild globalement, corriger propriété des fichiers, reconstruire sans sudo&lt;br /&gt;
* Résultat final : le service Anubis fonctionne correctement et protège le site desk.nasqueron.org&lt;/div&gt;</summary>
		<author><name>Ptdradmin</name></author>
	</entry>
</feed>