调试错误“gcc:error:x86_64-linux-gnu-gcc:No such file or directory”

2024-09-26 17:56:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试建立: https://github.com/kanzure/nanoengineer

但看起来它错在:

gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/python2.7   -std=c99 x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -MT libstructcompare_a-structcompare.o -MD -MP -MF .deps/libstructcompare_a-structcompare.Tpo -c -o libstructcompare_a-structcompare.o `test -f 'structcompare.c' || echo './'`structcompare.c
gcc: error: x86_64-linux-gnu-gcc: No such file or directory

x86_64-linux-gnu-gcc肯定存在于/usr/bin中(这是一个符号链接),目标也肯定存在。在我看来,Makefile没有正确生成,也许在指定x86_64-linux-gnu-gcc之前应该传递一个标志?我也不确定指定x86_64-linux-gnu-gcc应该完成什么。

最后,这个makefile是由configure生成的,所以一旦我们缩小了错误的原因,我就必须找出要修改的文件来修复这个问题。(我自己也是一个CMake类型的人,但是我当然没有为这个项目选择构建系统)我的操作系统是Debian。

我也试过建这个分支: https://github.com/kanzure/nanoengineer/branches/kirka-updates

如果你能尝试在你的系统上建立这个,我将非常感谢!谢谢!


Tags: httpsgnugithubcomconfiglinuxusr系统
3条回答

你只需要:

sudo apt-get install gcc.

该错误可能是由于缺少几个包中的一个造成的。下面的命令将安装几个包,如g++、gcc等

sudo apt-get install build-essential

经过大量的工作之后,我得以在Ubuntu12.04x86和Debian7.4x86上构建它。我在下面写了一本指南。你能试着跟着它看看它能不能解决这个问题吗?

如果没有,请告诉我你在哪里卡住了。

安装公共依赖项

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev

安装NumArray 1.5.2

wget http://goo.gl/6gL0q3 -O numarray-1.5.2.tgz
tar xfvz numarray-1.5.2.tgz
cd numarray-1.5.2
sudo python setup.py install

安装数字23.8

wget http://goo.gl/PxaHFW -O numeric-23.8.tgz
tar xfvz numeric-23.8.tgz
cd Numeric-23.8
sudo python setup.py install

安装HDF5 1.6.5

wget ftp://ftp.hdfgroup.org/HDF5/releases/hdf5-1.6/hdf5-1.6.5.tar.gz
tar xfvz hdf5-1.6.5.tar.gz
cd hdf5-1.6.5
./configure --prefix=/usr/local
sudo make 
sudo make install

安装Nanoengineer

git clone https://github.com/kanzure/nanoengineer.git
cd nanoengineer
./bootstrap
./configure
make
sudo make install

故障排除

在Debian Jessie上,您将收到cant pants提到的错误消息。在汽车制造脚本中似乎有一个问题。x86_64-linux-gnu-gcc插入到CFLAGS中,并且gcc将其解释为一个源文件的名称。作为解决方法,让我们用该名称创建一个空文件。空的,这样它就不会改变程序和那个名字,这样编译器就可以接收它。从克隆的nanoengineer目录中,运行此命令以使gcc高兴(这是一个hack-yes,但它确实有效)。。。

touch sim/src/x86_64-linux-gnu-gcc

如果在尝试编译HDF5时收到一条错误消息,其行为:“error:调用用属性error:open with O_CREAT in second argument声明的'\uu open_missing_mode',需要3个参数”,则修改文件perform/zip_perf.c,第548行如下所示,然后重新运行make。。。

output = open(filename, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR);

如果在生成Nanoengineer时收到有关找不到Numeric/arrayobject.h的错误消息,请尝试运行

export CPPFLAGS=-I/usr/local/include/python2.7
./configure
make
sudo make install

如果收到类似于“TRACE_PREFIX undeclared”的错误消息,请修改文件sim/src/simhelp.c第38至41行,使其看起来像这样,然后重新运行make:

#ifdef DISTUTILS
static char tracePrefix[] = "";
#else
static char tracePrefix[] = "";

如果在尝试启动NanoEngineer-1时收到一条错误消息,其中提到类似于“无法导入名称GL_ARRAY_BUFFER_ARB”的内容,请修改以下文件中的行

/usr/local/bin/NanoEngineer1_0.9.2.app/program/graphics/drawing/setup_draw.py
/usr/local/bin/NanoEngineer1_0.9.2.app/program/graphics/drawing/GLPrimitiveBuffer.py
/usr/local/bin/NanoEngineer1_0.9.2.app/program/prototype/test_drawing.py

看起来像这样:

from OpenGL.GL import GL_ARRAY_BUFFER_ARB
from OpenGL.GL import GL_ELEMENT_ARRAY_BUFFER_ARB

像这样:

from OpenGL.GL.ARB.vertex_buffer_object import GL_ARRAY_BUFFER_AR
from OpenGL.GL.ARB.vertex_buffer_object import GL_ELEMENT_ARRAY_BUFFER_ARB

我还发现了另一个已删除的疑难解答文本文件,但您可以找到它here

相关问题 更多 >

    热门问题