ambari-vagrant icon indicating copy to clipboard operation
ambari-vagrant copied to clipboard

Install python-dev, allowing ambari to build on vagrant provisioned machines

Open jhalterman opened this issue 9 years ago • 4 comments

Install python-dev so that ambari builds can succeed on vagrant provisioned machines. Current builds fail via psutils-compile in ambari-metrics-host-monitoring with:

[INFO] --- maven-antrun-plugin:1.7:run (psutils-compile) @ ambari-metrics-host-monitoring ---
[INFO] Executing tasks

psutils-compile:
     [exec] running build
     [exec] running build_py
     [exec] running build_ext
     [exec] building '_psutil_linux' extension
     [exec] gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
     [exec] psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory
     [exec] compilation terminated.
     [exec] error: command 'gcc' failed with exit status 1
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:27.269s
[INFO] Finished at: Thu Jun 11 18:35:59 UTC 2015
[INFO] Final Memory: 43M/290M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (psutils-compile) on project ambari-metrics-host-monitoring: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec dir="/ambari/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/psutil" executable="/ambari/ambari-metrics/ambari-metrics-host-monitoring/../../ambari-common/src/main/unix/ambari-python-wrap" failonerror="true">... @ 4:231 in /ambari/ambari-metrics/ambari-metrics-host-monitoring/target/antrun/build-psutils-compile.xml

jhalterman avatar Jun 11 '15 18:06 jhalterman

thank you so much!!

derek800109 avatar Oct 05 '15 19:10 derek800109

thank you very much. For CentOS: yum install python-devel.x86_64

rila121 avatar Jul 08 '16 09:07 rila121

Thank you

chaitu750 avatar Feb 26 '21 05:02 chaitu750

successfully fixed the error with installing gcc on Centos7

NormanTrinh avatar Jan 04 '24 18:01 NormanTrinh