asottile / babi

a text editor
MIT License
396 stars 46 forks source link

babi won't install in ARM64 Debian 11 system #290

Closed alexsch01 closed 1 year ago

alexsch01 commented 1 year ago

SOLUTION: install "libonig-dev", "libpython3-dev", and "gcc"

Steps to reproduce:

sudo apt update
sudo apt install python3-venv
rm -rf venv
python3 -m venv venv
. venv/bin/activate
pip install babi

Error message:

Running setup.py install for onigurumacffi ... error
    ERROR: Command errored out with exit status 1:
     command: /home/user/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tiq8t1xk/onigurumacffi_2c400d0f09694ac48b792288281aa6cd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tiq8t1xk/onigurumacffi_2c400d0f09694ac48b792288281aa6cd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-tjw5m1_u/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/venv/include/site/python3.9/onigurumacffi
         cwd: /tmp/pip-install-tiq8t1xk/onigurumacffi_2c400d0f09694ac48b792288281aa6cd/
    Complete output (14 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-aarch64-3.9
    copying onigurumacffi.py -> build/lib.linux-aarch64-3.9
    running build_ext
    generating cffi module 'build/temp.linux-aarch64-3.9/_onigurumacffi.c'
    creating build/temp.linux-aarch64-3.9
    building '_onigurumacffi' extension
    creating build/temp.linux-aarch64-3.9/build
    creating build/temp.linux-aarch64-3.9/build/temp.linux-aarch64-3.9
    aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-PN012d/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-PN012d/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/user/venv/include -I/usr/include/python3.9 -c build/temp.linux-aarch64-3.9/_onigurumacffi.c -o build/temp.linux-aarch64-3.9/build/temp.linux-aarch64-3.9/_onigurumacffi.o
    error: command 'aarch64-linux-gnu-gcc' failed: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/user/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tiq8t1xk/onigurumacffi_2c400d0f09694ac48b792288281aa6cd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tiq8t1xk/onigurumacffi_2c400d0f09694ac48b792288281aa6cd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-tjw5m1_u/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/venv/include/site/python3.9/onigurumacffi Check the logs for full command output.
asottile commented 1 year ago

that's not babi - install libonig-dev

alexsch01 commented 1 year ago

The solution for anyone who is having this issue

sudo apt update
sudo apt install python3-venv libonig-dev libpython3-dev gcc
rm -rf venv
python3 -m venv venv
. venv/bin/activate
pip install babi