As it is known, SageMath is not available in the FreeBSD repository. But there is a fix! Just like WSL for Windows, we have something similar for FreeBSD called the Linux Binary Compatibility. It simply uses the chroot technology to run Linux binaries in the FreeBSD environment. This is the beauty of POSIX standard. I would recommend installing Ubuntu using the "debootstrap" command on the empty folder /compat/ubuntu.
After following the instructions there, you will most likely run the command "chroot /compat/ubuntu /bin/bash" which will bring you to the Linux substation and you can modify your home folder there! Then you run as root "apt-get install sagemath sagemath-doc-en sagemath-jupyter". The installation will probably take up 5GB of space. You will also need to install a browser. For instance "apt install firefox". Afterwhich you will run
sage -n jupyter --allow-root
To run as root in the chroot-ed environment sagemath jupyter. Because xorg will not run on this chroot environment, you will not be able to launch firefox from there but instead, copy the localhost IP address into your **host** browser and you can use sagemath from there!
Comme vous le savez, l'installation directe de SageMath dans FreeBSD est impossible, car ce logiciel n'existe pas dans le depôt logiciel de FreeBSD. Pour contourner ce problème, il suffit d'installer Linux dans FreeBSD en suivant les instructions trouvées ici Linux Binary Compatibility. Je conseille fortement installer Ubuntu avec "debootstrap" dans un dossier vide, par exemple, /compat/ubuntu
Dès que vous avez installé le Linux, lancer Ubuntu avec "chroot /compat/ubuntu /bin/bash", qui vous emmène dans le Linux substation où vous pouvez modifier le contenu de votre dossier "home". Et puis, tapez "apt-get install sagemath sagemath-doc-en sagemath-jupyter" pour les installer, qui va prendre 5GB de stockage. Ensuite, installez firefox. Pour utiliser SageMath, tapez
sage -n jupyter --allow-root
qui va vous donner l'adresse IP pour y accéder. Vous devez mettre cette adresse dans votre navigateur préferé dans le machine hôte (qui est important! car xorg ne peut pas être lancé dans le Linux Substation), et voilà, vous auriez un SageMath pour faire les calculs! Félicitations!