sapling icon indicating copy to clipboard operation
sapling copied to clipboard

Install on Ubuntu > 22.04

Open antspy opened this issue 6 months ago • 3 comments

Hi,

How are we meant to install the CLI on Ubuntu > 22.04?

I tried the 'download with curl' method (from the instructions) but this is failing at installation time. I assume because my Ubuntu version is 24.04 and this is not supported?


If it's meant to work, I can provide more information about why it's failing: It complains that

The following packages have unmet dependencies:
 sapling : Depends: libpython3.10 (>= 3.10.0) but it is not installable
           Recommends: nodejs but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I have python3 installed on my system though:

   dpkg -l | grep libpython
ii  libpython3-dev:amd64             3.12.3-0ubuntu2                   amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64          3.12.3-0ubuntu2                   amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.12-dev:amd64          3.12.3-1ubuntu0.5                 amd64        Header files and a static library for Python (v3.12)
ii  libpython3.12-minimal:amd64      3.12.3-1ubuntu0.5                 amd64        Minimal subset of the Python language (version 3.12)
ii  libpython3.12-stdlib:amd64       3.12.3-1ubuntu0.5                 amd64        Interactive high-level object-oriented language (standard library, version 3.12)
ii  libpython3.12t64:amd64           3.12.3-1ubuntu0.5                 amd64        Shared Python runtime library (version 3.12)
python3 --version
3.12.3

antspy avatar Jun 17 '25 18:06 antspy

FWIW I ended up building my own package for Debian Testing. I wouldn't recommend using my repo (it is very much built to scratch my own itch), but the Dockerfile used for building might be helpful if you want to build your own packages for ubuntu -- https://github.com/shish/hacky-debian-packages

shish avatar Jun 24 '25 13:06 shish

Update: it seems that python 3.12 was recently removed from Debian Testing, so the Dockerfile that I wrote for self-contained package-building no longer works (it was only working when I tested locally because I still had the old packages in my cache) 😢

So now it seems we are in a world where on both Ubuntu and Debian, old releases have too-old Rust (Needs >= 1.85 for edition2024 feature), and new releases have too-new Python (needs <=3.12 for API compatibility) 😭

shish avatar Jun 26 '25 18:06 shish

Hi, we plan to release a "portable" executable that runs across many Linux distributions. It includes a statically linked Python 3.12. It has been tested to work on Debian 12 for ARM.

You can give it a try from https://github.com/quark-zju/sapling/releases/tag/0.2.20250609-151406%2B89d41e68

quark-zju avatar Jul 16 '25 02:07 quark-zju