树莓派搭建jupyter notebook、jupyterlab 报错解决办法

树莓派搭建jupyter notebook、jupyterlab 报错解决办法


error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1

arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.8/c/_cffi_backend.o
      c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
         15 | #include <ffi.h>
            |          ^~~~~~~
      compilation terminated.
      error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8by4b4w4/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8by4b4w4/cffi/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-qb7roz9j/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-z06xgl2f/overlay --compile --install-headers /tmp/pip-build-env-z06xgl2f/overlay/include/python3.8/cffi Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-z06xgl2f/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://mirrors.aliyun.com/pypi/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.0' Check the logs for full command output.

报错原因是缺少必要依赖的库
执行apt-get install build-essential libssl-dev libffi-dev python3-dev

root@mypi:~# apt-get install build-essential libssl-dev libffi-dev python3-dev
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 9954 (unattended-upgr)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

报错
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 9954 (unattended-upgr)

解决方法:
删掉之前遗留下来的进程

root@mypi:~# sudo rm /var/cache/apt/archives/lock-frontend
root@mypi:~# sudo  rm /var/lib/dpkg/lock-frontend
root@mypi:~# sudo rm /var/cache/apt/archives/lock
root@mypi:~# sudo  rm /var/lib/dpkg/lock

然后重新运行安装即可解决问题。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值