我有Ubuntu 14.04。
我试图安装一个python库(deepdish)
当我执行命令sudo python setup.py install
时,我收到以下错误。
x86_64-linux-gnu-gcc: internal compiler error: Segmentation fault (program collect2)
在尝试安装或制作其他内容时,我面临类似的“内部编译器错误”类型。我认为我的系统中出现了一些问题。有些东西似乎已经腐败了。我无法弄清楚原因。可能与gcc或build-essential有关。
以下是详细输出:
$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to deepdish.egg-info/requires.txt
writing deepdish.egg-info/PKG-INFO
writing top-level names to deepdish.egg-info/top_level.txt
writing dependency_links to deepdish.egg-info/dependency_links.txt
reading manifest file 'deepdish.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'deepdish.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'deepdish.plot.resample' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c deepdish/plot/resample.c -o build/temp.linux-x86_64-2.7/deepdish/plot/resample.o
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from deepdish/plot/resample.c:258:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:26:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from deepdish/plot/resample.c:258:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h:1629:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
_import_array(void)
^
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ufuncobject.h:327:0,
from deepdish/plot/resample.c:259:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: ‘_import_umath’ defined but not used [-Wunused-function]
_import_umath(void)
^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/deepdish/plot/resample.o -o build/lib.linux-x86_64-2.7/deepdish/plot/resample.so
x86_64-linux-gnu-gcc: internal compiler error: Segmentation fault (program collect2)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4
修改
我尝试了以下事项:
$ ldd /usr/bin/gcc
linux-vdso.so.1 => (0x00007fff5d7fe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2c8ba69000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2c8be74000)
$ catchsegv usr/bin/gcc
/usr/bin/catchsegv: 58: /usr/bin/catchsegv: usr/bin/gcc: not found
$ ls -lah /usr/bin/gcc*
lrwxrwxrwx 1 root root 7 Apr 8 2014 /usr/bin/gcc -> gcc-4.8
-rwxr-xr-x 1 root root 566K Mar 20 2014 /usr/bin/gcc-4.7
-rwxr-xr-x 1 root root 758K May 15 00:24 /usr/bin/gcc-4.8
lrwxrwxrwx 1 root root 10 Apr 8 2014 /usr/bin/gcc-ar -> gcc-ar-4.8
-rwxr-xr-x 1 root root 23K Mar 20 2014 /usr/bin/gcc-ar-4.7
-rwxr-xr-x 1 root root 27K May 15 00:24 /usr/bin/gcc-ar-4.8
lrwxrwxrwx 1 root root 10 Apr 8 2014 /usr/bin/gcc-nm -> gcc-nm-4.8
-rwxr-xr-x 1 root root 23K Mar 20 2014 /usr/bin/gcc-nm-4.7
-rwxr-xr-x 1 root root 27K May 15 00:24 /usr/bin/gcc-nm-4.8
lrwxrwxrwx 1 root root 14 Apr 8 2014 /usr/bin/gcc-ranlib -> gcc-ranlib-4.8
-rwxr-xr-x 1 root root 23K Mar 20 2014 /usr/bin/gcc-ranlib-4.7
-rwxr-xr-x 1 root root 27K May 15 00:24 /usr/bin/gcc-ranlib-4.8