'gcc' ล้มเหลวระหว่างการสร้างแพนด้าบน AWS Elastic Beanstalk

รับข้อผิดพลาดต่อไปนี้เมื่อพยายามติดตั้ง Pandas (0.16.0) ซึ่งอยู่ในไฟล์ needs.txt ของฉันบนอินสแตนซ์ AWS Elastic Beanstalk EC2:

  building 'pandas.msgpack' extension

  gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -D__LITTLE_ENDIAN__=1 -Ipandas/src/klib -Ipandas/src -I/opt/python/run/venv/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c pandas/msgpack.cpp -o build/temp.linux-x86_64-2.7/pandas/msgpack.o

  gcc: error trying to exec 'cc1plus': execvp: No such file or directory

  error: command 'gcc' failed with exit status 1

ฉันใช้งานบน 64bit Amazon Linux 2015.03 v1.3.0 running Python 2.7 และก่อนหน้านี้พบข้อผิดพลาดเดียวกันนี้บนอินสแตนซ์ t1.micro ซึ่งได้รับการแก้ไขเมื่อฉันเปลี่ยนเป็น m3.medium แต่ฉันใช้งาน m3.xlarge ดังนั้นจึงไม่มีปัญหาเรื่องหน่วยความจำ

ฉันยังมั่นใจด้วยว่ามีการติดตั้ง gcc เป็นแพ็คเกจใน .ebextensions/00_gcc.config:

packages:
   yum:
      gcc: []
      gcc-c++: []

person greenafrican    schedule 08.04.2015    source แหล่งที่มา
comment
มีปัญหานี้มาสองสามวันแล้ว การสร้างสภาพแวดล้อมขึ้นใหม่ จากนั้นเปิดใช้งานการเอ็กซเรย์และสุขภาพ/การบันทึกที่ได้รับการปรับปรุงสามารถแก้ไขปัญหานี้ได้ แม้ว่าฉันจะไม่รู้ว่าทำไมถึงมีความเชื่อมโยงกัน   -  person Andrey Bulezyuk    schedule 06.05.2020


คำตอบ (5)


สำหรับแพนด้าที่ถูกคอมไพล์บน Elastic Beanstalk ตรวจสอบให้แน่ใจว่ามีทั้งแพ็คเกจ: gcc-c++ และ python-devel

packages:
   yum:
      gcc-c++: []
      python-devel: []
person linqu    schedule 24.06.2015
comment
โปรดทราบว่าแพ็คเกจปัจจุบันคือ python34-devel - person David Arcos; 29.06.2016

ติดตั้ง python-dev

sudo apt-get install python-dev

สำหรับ python3

sudo apt-get install python3-dev
person itzMEonTV    schedule 08.04.2015
comment
ฉันสามารถติดตั้งลงในแพ็คเกจ yum ได้ไหม python-devel: [] ? - person greenafrican; 09.04.2015

บนอินสแตนซ์ ec2 หากคุณพบข้อผิดพลาด gcc ลองสิ่งนี้

  1. sudo yum ติดตั้ง gcc python-setuptools python-devel postgresql-devel

  2. ซูโดะ ซู -

  3. ติดตั้ง sudo pip

person janakiram pulipati    schedule 24.02.2017

ฉันต้องอัปเกรด EC2 pip ของ amazon คุณสามารถทำได้โดยแก้ไขไฟล์ .config ใน .ebextensions:

sh commands: 00_update_pip: command: "/opt/python/run/venv/bin/pip install --upgrade pip"

person João Abrantes    schedule 29.06.2017

ฉันแก้ไขปัญหานี้โดยเข้าไปที่เครื่อง EBS และอัปเดต pip

pip install -U pip
person imeckr    schedule 21.07.2017
comment
นี่อาจไม่ใช่สิ่งที่ฉลาดที่สุดที่ควรทำในกรณีที่เครื่อง EB ยุติการทำงานลง เนื่องจากการเปลี่ยนแปลงด้วยตนเองเหล่านั้นจะไม่คงอยู่หลังจากรีบูต - person arturomp; 07.03.2018