简体   繁体   English

在 Raspberry Pi 1B 上安装 Pillow 失败“gcc:致命错误:终止信号终止程序 cc1”

[英]Installing Pillow on Raspberry Pi 1B fails "gcc: fatal error: Killed signal terminated program cc1"

I am trying to install pillow 6.2.1 on a Raspberry Pi model 1B running Arch Linux ARM (in the worst case I could buy a newer raspberry pi but the point of this project was to upcycle the old Pi).我正在尝试在运行Arch Linux ARM的 Raspberry Pi 型号 1B 上安装枕头 6.2.1(在最坏的情况下,我可以购买更新的树莓派,但该项目的目的是升级旧的 Pi)。

I tried installing in the standard way我尝试以标准方式安装

pip install pillow==6.2.1

but the compiler ran out of memory so I then ran但是编译器内存不足,所以我跑了

pip --no-cache-dir install pillow==6.2.1

which produced a different error given below.这产生了下面给出的不同错误。

I am not sure how to interpret this error我不知道如何解释这个错误

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DPILLOW_VERSION="6.2.1" -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imaging.c -o build/temp.linux-armv6l-3.8/src/_imaging.o
src/_imaging.c: In function '_set_blocks_max':
src/_imaging.c:3697:26: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
 3697 |     else if ( blocks_max > SIZE_MAX/sizeof(ImagingDefaultArena.blocks_pool[0])) {
      |                          ^
{standard input}: Assembler messages:
{standard input}:21669: Warning: end of file not at end of a line; newline inserted
{standard input}:21792: Error: found '
', expected: ')'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
building 'PIL._imagingtk' extension
creating build/temp.linux-armv6l-3.8/src/Tk
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -Isrc/Tk -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imagingtk.c -o build/temp.linux-armv6l-3.8/src/_imagingtk.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -Isrc/Tk -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/Tk/tkImaging.c -o build/temp.linux-armv6l-3.8/src/Tk/tkImaging.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-armv6l-3.8/src/_imagingtk.o build/temp.linux-armv6l-3.8/src/Tk/tkImaging.o -L/tmp/pip-install-yqwi0r_s/pillow -L/usr/lib -L/opt/vc/lib -L/usr/lib/openmpi -L/usr/lib/libfakeroot -L/usr/local/lib -L/usr/lib -o build/lib.linux-armv6l-3.8/PIL/_imagingtk.cpython-38-arm-linux-gnueabihf.so
building 'PIL._imagingmath' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imagingmath.c -o build/temp.linux-armv6l-3.8/src/_imagingmath.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-armv6l-3.8/src/_imagingmath.o -L/tmp/pip-install-yqwi0r_s/pillow -L/usr/lib -L/opt/vc/lib -L/usr/lib/openmpi -L/usr/lib/libfakeroot -L/usr/local/lib -L/usr/lib -o build/lib.linux-armv6l-3.8/PIL/_imagingmath.cpython-38-arm-linux-gnueabihf.so
building 'PIL._imagingmorph' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fno-semantic-interposition -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -march=armv6 -mfloat-abi=hard -mfpu=vfp -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I/tmp/pip-install-yqwi0r_s/pillow/src/libImaging -I/tmp/pip-install-yqwi0r_s/pillow -I/usr/include -I/usr/local/include -I/usr/include/python3.8 -c src/_imagingmorph.c -o build/temp.linux-armv6l-3.8/src/_imagingmorph.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-armv6l-3.8/src/_imagingmorph.o -L/tmp/pip-install-yqwi0r_s/pillow -L/usr/lib -L/opt/vc/lib -L/usr/lib/openmpi -L/usr/lib/libfakeroot -L/usr/local/lib -L/usr/lib -o build/lib.linux-armv6l-3.8/PIL/_imagingmorph.cpython-38-arm-linux-gnueabihf.so
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yqwi0r_s/pillow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yqwi0r_s/pillow/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-i24ol927/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

The assembler message makes me think that it might be something to do with the Pi running out of resources.汇编器消息让我认为这可能与 Pi 耗尽资源有关。 But is it instead just missing some dependecies or is there any way around this?但它是不是只是缺少一些依赖项,或者有什么办法可以解决这个问题?

The Raspberry Pi 1B only has 512MB of RAM. Raspberry Pi 1B 只有 512MB 的 RAM。 To get around this I plugged in an external hard drive and allocated 2GB of SWAP space.为了解决这个问题,我插入了一个外部硬盘驱动器并分配了 2GB 的 SWAP 空间。 The installation process was very slow but it completed in the end using安装过程很慢,但最终使用

pip install pillow==6.2.1

this also allowed other programs to install that otherwise wouldn't.这也允许其他程序安装否则不会安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM