本文介绍了Intel c / c ++编译器:“无法定位可执行文件icc” (和ecc)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我最近为linux安装了一个英特尔的c / c ++编译器:Intel®C ++ Composer XE for Linux。 当我在安装时,选项(或包)涉及编译器和调试器,并对安装程序说,我将编译64位应用程序。 现在当我尝试编译程序,我得到: meniwis @ meniwis-Satellite-L845:〜/ syscave / src / c-ext / code $ ./build.sh 无法找到可执行文件icc 无法找到可执行文件ecc INFO:root:using / opt / alges / as sqlite3目录 INFO :root:using / opt / alges / as HDF5 directory 运行build_ext 运行build_src build_src 构建扩展cvoronoisources 构建扩展cflowsimsources build_src:构建npy-pkg配置文件自定义IntelCCompiler 使用build_ext自定义IntelCCompiler 自定义IntelCCompiler 使用build_ext 自定义IntelCCompiler构建'cvoronoi'扩展编译C ++源代码 C编译器:icc -fPIC 编译选项:'-g -I / home / meniwis / syscave / src / c-ext / code /../ include - I / usr / lib / python2.7 / dist-packages / numpy / core / include -I / usr / include / python2.7 -c' icc:/ home / meniwis / syscave / src / c-ext / code / cvoronoi.cpp sh:1:icc:未找到 sh:1:icc:未找到错误:命令icc -fPIC -g -I /home/meniwis/syscave/src/c-ext/code/../include - I / usr / lib / python2.7 / dist-packages / numpy / core / include -I / usr / include / python2.7 -c /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp -o build / temp.linux-x86_64- 2.7 / home / meniwis / syscave / src /c-ext/code/cvoronoi.o失败退出状态127 我在做什么: 在comand行中键入: meniwis @ meniwis-Satellite-L845:〜/ syscave / src / c-ext / code $ ./build.sh build.sh文件是下一个: export HDF5_DIR = / opt / alges / export SQLITE3_DIR = / opt / alges / export SYSCAVE_ROOT = / home / meniwis / syscave / python setup.py build_ext --inplace setup.py文件的一部分: 。 。 。 voronoi_src_dir = abspath(pjoin(syscave_root,'src / c-ext / code')) cflowsim_src_dir = abspath(pjoin(syscave_root,'src / c-ext / code / flowsim / code / Flowsim' )) extensions = [ Extension('cvoronoi', sources = [ pjoin(voronoi_src_dir,'cvoronoi.cpp'), pjoin (voronoi_src_dir,'VoronoiDiagramGenerator.cpp')], language =c ++, include_dirs = [pjoin(voronoi_src_dir,'.. / include')], extra_objects = lib_args ['extra_compile_args'] ),扩展('cflowsim', sources = [ pjoin(cflowsim_src_dir,'cflowsim.cpp'), pjoin (cflowsim_src_dir,'parsers.cpp'), pjoin(cflowsim_src_dir,'Cell.cpp'), pjoin(cflowsim_src_dir,'ChunkDriver.cpp'), pjoin(cflowsim_src_dir,'DataLoader .cpp'), pjoin(cflowsim_src_dir,'DisplayResult.cpp'), pjoin(cflowsim_src_dir,'Drawbell.cpp'), pjoin(cflowsim_src_dir,'DrawbellType.cpp' pjoin(cflowsim_src_dir,'Drawpoint.cpp'), pjoin(cflowsim_src_dir,'ExtractionResult.cpp'), pjoin(cflowsim_src_dir,'Model.cpp'), pjoin (cflowsim_src_dir,'Simulator.cpp'), pjoin(cflowsim_src_dir,'Tracer.cpp'),], language =c ++, extra_objects = lib_args [ extra_compile_args'], ** lib_args )] #移至软件包 #all默认为ext_dir ext_run_dir = abspath(pjoin(syscave_root,'src / python / syscave / extensions /')) moves = [] 在扩展中的ext:如果ext.name不在移动: moves.append((ext.name,ext_run_dir)) moves.append(None) ext_src_dir = pjoin(syscave_root,'src','c- ext','code')#='。' file_ext ='' if os.name =='posix': file_ext ='so' build_path = abspath (ext_src_dir) elif os.name =='nt': file_ext ='pyd' build_path = abspath(ext_src_dir) else: raise EnvironmentError不支持的平台:{0}'。格式(os.name)) 对于i,m在枚举中(移动):如果m是无: continue name,new_path = m file_name =。join([name,file_ext]) file_path_from = os.path.join(build_path,file_name) file_path_to = os.path。 join(new_path,file_name) moves [i] =(file_path_from,file_path_to)。 。 。 所以错误是icc和ecc?或者是别的什么?如果这是,我怎么解决呢?任何方向?。 提前感谢。 Grettings。 --------------------- EDIT ------- --------------------------- 在@Vahid abdi的帮助下,我执行下列操作: export PATH = $ PATH:/ opt / intel / bin / 现在我得到: meniwis @ meniwis-Satellite-L845:〜/ syscave / src / c-ext / code $ ./build.sh 找到可执行文件/ opt / intel / bin / icc 无法找到可执行文件ecc INFO:root:using / opt / alges / as sqlite3目录 INFO:root:using / opt / alges / as HDF5目录运行build_ext 运行build_src build_src 构建扩展cvoronoi源构建扩展cflowsim源 build_src:构建npy-pkg配置文件自定义IntelCCompiler 使用build_ext自定义intelCCompiler 自定义intelCCompiler 使用build_ext 自定义intelCCompiler构建'cvoronoi'扩展编译C ++源 C编译器:icc -fPIC 编译选项:'-g -I / home / meniwis / syscave / src / c-ext / code /../ include - I / usr / lib / python2.7 / dist-packages / numpy / core / include -I / usr / include / python2.7 -c' icc:/home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp 在包含/ usb / include / c ++ / 4.8 / bits / stl_tree.h(61),从/usr/include/c++/4.8/map(60),从/ home / meniwis / syscave / src / c- ext / code /../ include / VoronoiDiagramGenerator.h(36),来自/home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(9): /usr/include/c++/4.8/bits/stl_algobase.h(59):灾难性错误:无法打开源文件bits / c + + config.h #include< bits / c + + config.h> ^ 编译中止/home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(代码4)在/ usr / include中包含的文件/c++/4.8/bits/stl_tree.h(61),来自/usr/include/c++/4.8/map(60),从/ home / meniwis / syscave / src / c- ext / code /../ include / VoronoiDiagramGenerator.h(36),来自/home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(9): /usr/include/c++/4.8/bits/stl_algobase.h(59):灾难性错误:无法打开源文件bits / c ++ config.h #include< bits / c ++ config.h> ^ 编译中止/home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(代码4)错误:命令icc -fPIC - g -I / home / meniwis / syscave / src / c-ext / code /../ include - I / usr / lib / python2.7 / dist-packages / numpy / core / include -I / usr /include/python2.7 -c /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp -o build / temp.linux-x86_64- 2.7 / home / meniwis / syscave / src / c-ext / code / cvoronoi.o退出状态失败4 。现在的问题是icc无法打开 bits / 如果您有 bits / c ++ config.h ,则c ++ config.h 首先尝试找到它的路径(可能是:/usr/include/x86_64-linux-gnu/c++/4.7)并将其添加到icc如下 export __INTEL_POST_CFLAGS = - I / usr / include / x86_64-linux-gnu / c ++ / 4.7 I recently installed a Intel's c/c++ compiler for linux: "Intel® C++ Composer XE for Linux".When i was doing the installation, only marked the options(or packages) relates to the compiler and debugger, and said to the instaler that i will compile 64bit aplications.Now when i try to compile a program i get:meniwis@meniwis-Satellite-L845:~/syscave/src/c-ext/code$ ./build.shCould not locate executable iccCould not locate executable eccINFO:root:using /opt/alges/ as sqlite3 directoryINFO:root:using /opt/alges/ as HDF5 directoryrunning build_extrunning build_srcbuild_srcbuilding extension "cvoronoi" sourcesbuilding extension "cflowsim" sourcesbuild_src: building npy-pkg config filescustomize IntelCCompilercustomize IntelCCompiler using build_extcustomize IntelCCompilercustomize IntelCCompiler using build_extbuilding 'cvoronoi' extensioncompiling C++ sourcesC compiler: icc -fPICcompile options: '-g -I/home/meniwis/syscave/src/c-ext/code/../include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'icc: /home/meniwis/syscave/src/c-ext/code/cvoronoi.cppsh: 1: icc: not foundsh: 1: icc: not founderror: Command "icc -fPIC -g -I/home/meniwis/syscave/src/c-ext/code/../include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c/home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp -o build/temp.linux-x86_64-2.7/home/meniwis/syscave/src/c-ext/code/cvoronoi.o" failed with exit status 127Making a "step-by-step" of what i am doing:In comand line i type:meniwis@meniwis-Satellite-L845:~/syscave/src/c-ext/code$ ./build.shThe "build.sh" file is the next:export HDF5_DIR=/opt/alges/export SQLITE3_DIR=/opt/alges/export SYSCAVE_ROOT=/home/meniwis/syscave/python setup.py build_ext --inplaceA part of the "setup.py" file:...voronoi_src_dir=abspath(pjoin(syscave_root,'src/c-ext/code'))cflowsim_src_dir=abspath(pjoin(syscave_root,'src/c-ext/code/flowsim/code/Flowsim'))extensions = [ Extension('cvoronoi', sources=[ pjoin(voronoi_src_dir,'cvoronoi.cpp'), pjoin(voronoi_src_dir,'VoronoiDiagramGenerator.cpp') ], language = "c++", include_dirs=[pjoin(voronoi_src_dir,'../include')], extra_objects=lib_args['extra_compile_args'] ), Extension('cflowsim', sources=[ pjoin(cflowsim_src_dir,'cflowsim.cpp'), pjoin(cflowsim_src_dir,'parsers.cpp'), pjoin(cflowsim_src_dir,'Cell.cpp'), pjoin(cflowsim_src_dir,'ChunkDriver.cpp'), pjoin(cflowsim_src_dir,'DataLoader.cpp'), pjoin(cflowsim_src_dir,'DisplayResult.cpp'), pjoin(cflowsim_src_dir,'Drawbell.cpp'), pjoin(cflowsim_src_dir,'DrawbellType.cpp'), pjoin(cflowsim_src_dir,'Drawpoint.cpp'), pjoin(cflowsim_src_dir,'ExtractionResult.cpp'), pjoin(cflowsim_src_dir,'Model.cpp'), pjoin(cflowsim_src_dir,'Simulator.cpp'), pjoin(cflowsim_src_dir,'Tracer.cpp'), ], language = "c++", extra_objects=lib_args['extra_compile_args'], **lib_args )]#move to packages#all default to ext_dirext_run_dir=abspath(pjoin(syscave_root,'src/python/syscave/extensions/'))moves=[]for ext in extensions: if ext.name not in moves: moves.append((ext.name,ext_run_dir))moves.append(None)ext_src_dir=pjoin(syscave_root,'src','c-ext','code') #='.'file_ext=''if os.name=='posix': file_ext='so' build_path=abspath(ext_src_dir)elif os.name=='nt': file_ext='pyd' build_path=abspath(ext_src_dir)else: raise EnvironmentError('Unsupported platform: {0}'.format(os.name))for i,m in enumerate(moves): if m is None: continue name,new_path=m file_name=".".join([name,file_ext]) file_path_from=os.path.join(build_path,file_name) file_path_to =os.path.join(new_path,file_name) moves[i]=(file_path_from,file_path_to)...So the error is that icc and ecc cant be found? or is something else?, and if this is, how i solve it? Any directions?.Thanks in advance.Grettings.---------------------EDIT----------------------------------After the help of @Vahid abdi, i do the next:export PATH=$PATH:/opt/intel/bin/Now i get:meniwis@meniwis-Satellite-L845:~/syscave/src/c-ext/code$ ./build.shFound executable /opt/intel/bin/iccCould not locate executable eccINFO:root:using /opt/alges/ as sqlite3 directoryINFO:root:using /opt/alges/ as HDF5 directoryrunning build_extrunning build_srcbuild_srcbuilding extension "cvoronoi" sourcesbuilding extension "cflowsim" sourcesbuild_src: building npy-pkg config filescustomize IntelCCompilercustomize IntelCCompiler using build_extcustomize IntelCCompilercustomize IntelCCompiler using build_extbuilding 'cvoronoi' extensioncompiling C++ sourcesC compiler: icc -fPICcompile options: '-g -I/home/meniwis/syscave/src/c-ext/code/../include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'icc: /home/meniwis/syscave/src/c-ext/code/cvoronoi.cppIn file included from /usr/include/c++/4.8/bits/stl_tree.h(61), from /usr/include/c++/4.8/map(60), from /home/meniwis/syscave/src/c-ext/code/../include/VoronoiDiagramGenerator.h(36), from /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(9):/usr/include/c++/4.8/bits/stl_algobase.h(59): catastrophic error: cannot open sourcefile "bits/c++config.h" #include <bits/c++config.h> ^compilation aborted for /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp (code 4)In file included from /usr/include/c++/4.8/bits/stl_tree.h(61), from /usr/include/c++/4.8/map(60), from /home/meniwis/syscave/src/c-ext/code/../include/VoronoiDiagramGenerator.h(36), from /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(9):/usr/include/c++/4.8/bits/stl_algobase.h(59): catastrophic error: cannot open sourcefile "bits/c++config.h" #include <bits/c++config.h> ^compilation aborted for /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp (code 4)error: Command "icc -fPIC -g -I/home/meniwis/syscave/src/c-ext/code/../include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c/home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp -o build/temp.linux-x86_64-2.7/home/meniwis/syscave/src/c-ext/code/cvoronoi.o" failed with exit status 4Please help.Thanks in advance. 解决方案 Now the problem is icc can't open bits/c++config.hif you have bits/c++config.h first try to find it's path (which is probably is: /usr/include/x86_64-linux-gnu/c++/4.7) and add it to icc like belowexport __INTEL_POST_CFLAGS="-I/usr/include/x86_64-linux-gnu/c++/4.7" 这篇关于Intel c / c ++编译器:“无法定位可执行文件icc” (和ecc)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!