今天在ubuntu安装gcc编译器上编译parsekit通不过,怎么解决呢,亲

关于Ubuntu 14.04上编译失败 6l: running gcc failed: Cannot allocate memory - Golang中国
00:28 发布 681 次点击
最近将系统换为 Ubuntu 14.04 64位,安装了golang 1.4.2 但是编译过程中报错如下:
/usr/local/go/pkg/tool/linux_amd64/6l: running gcc failed: Cannot allocate memory
在google上查找解决方案未果,这个问题与 gcc 分配内存有关,gcc版本 :
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
至今尚未找到解决方案,因此向大家求助。
duguying 于
13:53 修改
我知道没人能够给我一个满意的答案,因为我在google上搜索了许久也没能找到满意的答案,不过今天这个问题却意外的消失了。是的,我重启了服务器系统之后,这个编译报错就没有了,重启服务器后同时开启多个服务程序尽可能的占用内存,但是依然无法重现。很显然,这并不是简单的内存不够用导致的。
这个错误应该与gcc有关,有人说是机器内存不够导致,但是显然不是因为内存不足导致的,因为有人用4G内存也报过这个错。但是具体原因我也不清楚,不过重启之后真的就正常了。“重启”大法好!
Cannot allocate memory
这么明显的问题,就是内存不够啊。回去好好学学英语再来写代码吧……
我在一台机器启动了4个容器后,想启动第五个容器的时候报了相同的错误,然后停掉之前的一个容器后再启动就不会报错了。我的机器本来内存就不大,应该就是内存问题。
后方可回复, 如果你还没有账号你可以
一个帐号。急急急,在虚拟机Ubuntu上编译驱动模块,在开发板上加载驱动错误
[问题点数:55分,结帖人mjjackey]
急急急,在虚拟机Ubuntu上编译驱动模块,在开发板上加载驱动错误
[问题点数:55分,结帖人mjjackey]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
2015年3月 Linux/Unix社区大版内专家分月排行榜第二2014年12月 Linux/Unix社区大版内专家分月排行榜第二2014年11月 Linux/Unix社区大版内专家分月排行榜第二2014年9月 Linux/Unix社区大版内专家分月排行榜第二2014年8月 Linux/Unix社区大版内专家分月排行榜第二2014年7月 Linux/Unix社区大版内专家分月排行榜第二2014年5月 Linux/Unix社区大版内专家分月排行榜第二2014年4月 Linux/Unix社区大版内专家分月排行榜第二
2014年3月 Linux/Unix社区大版内专家分月排行榜第三
2015年3月 Linux/Unix社区大版内专家分月排行榜第二2014年12月 Linux/Unix社区大版内专家分月排行榜第二2014年11月 Linux/Unix社区大版内专家分月排行榜第二2014年9月 Linux/Unix社区大版内专家分月排行榜第二2014年8月 Linux/Unix社区大版内专家分月排行榜第二2014年7月 Linux/Unix社区大版内专家分月排行榜第二2014年5月 Linux/Unix社区大版内专家分月排行榜第二2014年4月 Linux/Unix社区大版内专家分月排行榜第二
2014年3月 Linux/Unix社区大版内专家分月排行榜第三
2015年3月 Linux/Unix社区大版内专家分月排行榜第二2014年12月 Linux/Unix社区大版内专家分月排行榜第二2014年11月 Linux/Unix社区大版内专家分月排行榜第二2014年9月 Linux/Unix社区大版内专家分月排行榜第二2014年8月 Linux/Unix社区大版内专家分月排行榜第二2014年7月 Linux/Unix社区大版内专家分月排行榜第二2014年5月 Linux/Unix社区大版内专家分月排行榜第二2014年4月 Linux/Unix社区大版内专家分月排行榜第二
2014年3月 Linux/Unix社区大版内专家分月排行榜第三
2015年3月 Linux/Unix社区大版内专家分月排行榜第二2014年12月 Linux/Unix社区大版内专家分月排行榜第二2014年11月 Linux/Unix社区大版内专家分月排行榜第二2014年9月 Linux/Unix社区大版内专家分月排行榜第二2014年8月 Linux/Unix社区大版内专家分月排行榜第二2014年7月 Linux/Unix社区大版内专家分月排行榜第二2014年5月 Linux/Unix社区大版内专家分月排行榜第二2014年4月 Linux/Unix社区大版内专家分月排行榜第二
2014年3月 Linux/Unix社区大版内专家分月排行榜第三
2015年3月 Linux/Unix社区大版内专家分月排行榜第二2014年12月 Linux/Unix社区大版内专家分月排行榜第二2014年11月 Linux/Unix社区大版内专家分月排行榜第二2014年9月 Linux/Unix社区大版内专家分月排行榜第二2014年8月 Linux/Unix社区大版内专家分月排行榜第二2014年7月 Linux/Unix社区大版内专家分月排行榜第二2014年5月 Linux/Unix社区大版内专家分月排行榜第二2014年4月 Linux/Unix社区大版内专家分月排行榜第二
2014年3月 Linux/Unix社区大版内专家分月排行榜第三
2015年3月 Linux/Unix社区大版内专家分月排行榜第二2014年12月 Linux/Unix社区大版内专家分月排行榜第二2014年11月 Linux/Unix社区大版内专家分月排行榜第二2014年9月 Linux/Unix社区大版内专家分月排行榜第二2014年8月 Linux/Unix社区大版内专家分月排行榜第二2014年7月 Linux/Unix社区大版内专家分月排行榜第二2014年5月 Linux/Unix社区大版内专家分月排行榜第二2014年4月 Linux/Unix社区大版内专家分月排行榜第二
2014年3月 Linux/Unix社区大版内专家分月排行榜第三
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。因为 Ubuntu 10.04 不再官方维护 Xen 软件包了(),所以以后要想在这两大平台上用到 Xen 的话就需要自己亲自下载 Xen 源代码编译安装(当然也可以用第三方源)。今天 VPSee 在一台 Ubuntu 10.04 服务器上升级 Xen 到 4.0.1 的时候遇到一个问题,按照
上的步骤编译和安装都正常,启动 Xen 内核也没问题,最后启动 xend 的时候报错如下:
$ sudo /etc/init.d/xend start
Traceback (most recent call last):
File "/usr/sbin/xend", line 36, in
from xen.xend.server import SrvDaemon
ImportError: No module named xen.xend.server
Traceback (most recent call last):
File "/usr/sbin/xend", line 36, in
from xen.xend.server import SrvDaemon
ImportError: No module named xen.xend.server
.Traceback (most recent call last):
File "/usr/sbin/xend", line 36, in
from xen.xend.server import SrvDaemon
ImportError: No module named xen.xend.server
.Traceback (most recent call last):
File "/usr/sbin/xend", line 36, in
from xen.xend.server import SrvDaemon
刚开始怀疑是 Python 版本问题,后来查了一下 /usr/sbin/xend 文件发现第36行:from xen.xend.server import SrvDaemon 在导入 SrvDaemon 就报错,xend 可能没有找到 xen tools,怀疑和安装路径有关。Ubuntu 上 Python 的默认安装在 /usr/lib/python2.6/ 下面,如果不设定 PYTHON_PREFIX_ARG 参数手动编译安装 xen tools 后也会默认安装到 /usr/lib/python2.6/,这样就出问题了,因为 xend 会默认从 /usr/local/lib/python2.6/dist-packages/ 找 script 和导入库,但是这时候 /usr/local/lib/python2.6/dist-packages/ 下面什么东西都没有。所以要改变 install-tools 的默认安装路径到 /usr/local/lib/python2.6/dist-packages/ 下,PYTHON_PREFIX_ARG 不带任何参数就可以了:
$ sudo make install-tools PYTHON_PREFIX_ARG=
最后检查一下是否能正常启动 xend:
$ sudo /etc/init.d/xend start
$ sudo xm list
(8 Comments) 分类:小弟初学linux,编译安装模拟器时遇到下列问题解决不了,清各位指点一二 - 查看主题 & Ubuntu中文论坛
&[ 2 篇帖子 ]&
&文章标题 : 小弟初学linux,编译安装模拟器时遇到下列问题解决不了,清各位指点一二发表于 :
21:36帖子: 1
系统: splashtopos
送出感谢: 0 次
接收感谢: 0 次
[root@localhost ~]# ./下载/bash: ./下载/: 是一个目录[root@localhost ~]# cd ./下载[root@localhost 下载]# mount Fedora-18-i386-DVD.iso /mnt/f18dvd[root@localhost 下载]# yum intsall gcc已加载插件:langpacks, presto, refresh-packagekit没有命令: intsall。请使用 /usr/bin/yum --help[root@localhost 下载]# yum install opengl已加载插件:langpacks, presto, refresh-packagekitRepository 'install-dvd': Error parsing config: Error parsing &baseurl = 'file:///run/media/root/Fedora 18 i386'&: URL must be http, ftp, file or https not &&没有已启用的仓库。执行 &yum repolist all& 查看您拥有的仓库。您可以用 yum-config-manager --enable &仓库名& 来启用仓库[root@localhost 下载]# yum install opengl已加载插件:langpacks, presto, refresh-packagekitinstall-dvd
00:00 !!! install-dvd/primary_db
install-dvd/group_gz
00:00 !!! 没有可用的包 opengl。错误:无须任何处理[root@localhost 下载]# yum install OpenGL已加载插件:langpacks, presto, refresh-packagekit没有可用的包 OpenGL。错误:无须任何处理[root@localhost 下载]# cd /home/john/1/xmoto[root@localhost xmoto]# ./configurechecking build system type... i686-pc-linux-gnuchecking host system type... i686-pc-linux-gnuchecking target system type... i686-pc-linux-gnuchecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /usr/bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking for style of include used by make... GNUchecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking dependency style of gcc... gcc3checking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /usr/bin/grepchecking for egrep... /usr/bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking minix/config.h usability... nochecking minix/config.h presence... nochecking for minix/config.h... nochecking whether it is safe to define __EXTENSIONS__... yeschecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking dependency style of g++... gcc3checking how to run the C preprocessor... gcc -Echecking libkern/OSByteOrder.h usability... nochecking libkern/OSByteOrder.h presence... nochecking for libkern/OSByteOrder.h... nochecking whether byte ordering is bigendian... nochecking sqlite3.h usability... nochecking sqlite3.h presence... nochecking for sqlite3.h... noconfigure: error: &sqlite3 required&[root@localhost xmoto]# yum install sqlite3已加载插件:langpacks, presto, refresh-packagekit没有可用的包 sqlite3。错误:无须任何处理[root@localhost xmoto]# cd ../xmame[root@localhost xmame]# makeCompiling src/chd.c ...src/chd.c:13:18: 致命错误:zlib.h:没有那个文件或目录编译中断。make: *** [xmame.obj/chd.o] 错误 1[root@localhost xmame]# yum install zlib.h已加载插件:langpacks, presto, refresh-packagekit没有可用的包 zlib.h。错误:无须任何处理[root@localhost xmame]# ../mednafenbash: ../mednafen: 是一个目录[root@localhost xmame]# cd ../mednafen[root@localhost mednafen]# ./configurechecking for gcc... gccchecking for C compiler default output file name... a.outchecking whether the C compiler works... yeschecking whether we are cross compiling... nochecking for suffix of executables... checking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /usr/bin/grepchecking for egrep... /usr/bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking minix/config.h usability... nochecking minix/config.h presence... nochecking for minix/config.h... nochecking whether it is safe to define __EXTENSIONS__... yeschecking build system type... i686-pc-linux-gnuchecking host system type... i686-pc-linux-gnuchecking target system type... i686-pc-linux-gnuchecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /usr/bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking for gcc... (cached) gccchecking whether we are using the GNU C compiler... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking for gcc option to accept ISO C89... (cached) none neededchecking how to run the C preprocessor... gcc -Echecking dependency style of gcc... gcc3checking whether gcc and cc understand -c and -o together... yeschecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking dependency style of g++... gcc3checking how to run the C++ preprocessor... g++ -Echecking for a sed that does not truncate output... /usr/bin/sedchecking for fgrep... /usr/bin/grep -Fchecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -Bchecking the name lister (/usr/bin/nm -B) interface... BSD nmchecking whether ln -s works... yeschecking the maximum length of command line arguments... 1572864checking whether the shell understands some XSI constructs... yeschecking whether the shell understands &+=&... yeschecking for /usr/bin/ld option to reload object files... -rchecking for objdump... objdumpchecking how to recognize dependent libraries... pass_allchecking for ar... archecking for strip... stripchecking for ranlib... ranlibchecking command to parse /usr/bin/nm -B output from gcc object... okchecking for dlfcn.h... yeschecking whether we are using the GNU C++ compiler... (cached) yeschecking whether g++ accepts -g... (cached) yeschecking dependency style of g++... (cached) gcc3checking how to run the C++ preprocessor... g++ -Echecking for objdir... .libschecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPIC -DPICchecking if gcc PIC flag -fPIC -DPIC works... yeschecking if gcc static flag -static works... nochecking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.o... (cached) yeschecking whether the gcc linker (/usr/bin/ld) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yeschecking for ld used by g++... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking whether the g++ linker (/usr/bin/ld) supports shared libraries... yeschecking for g++ option to produce PIC... -fPIC -DPICchecking if g++ PIC flag -fPIC -DPIC works... yeschecking if g++ static flag -static works... nochecking if g++ supports -c -o file.o... yeschecking if g++ supports -c -o file.o... (cached) yeschecking whether the g++ linker (/usr/bin/ld) supports shared libraries... yeschecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking for simple visibility declarations... yeschecking for ptrdiff_t... yeschecking for size_t... yeschecking size of short... 2checking size of int... 4checking size of long... 4checking size of long long... 8checking size of double... 8checking size of __int64... 0checking size of void *... 4checking size of size_t... 4checking size of ptrdiff_t... 4checking for an ANSI C-conforming const... yeschecking for memcmp... yeschecking for memcpy... yeschecking for memmove... yeschecking for memset... yeschecking for mmap... yeschecking for munmap... yeschecking for madvise... yeschecking for signal... yeschecking for fcntl... yeschecking for getenv... yeschecking for putenv... yeschecking for setenv... yeschecking for gettimeofday... yeschecking for usleep... yeschecking fcntl.h usability... yeschecking fcntl.h presence... yeschecking for fcntl.h... yeschecking for mkdir... yeschecking for _mkdir... nochecking whether mkdir takes one argument... nochecking for pkg-config... /usr/bin/pkg-configchecking pkg-config is at least version 0.9.0... yeschecking for library containing clock_gettime... -lrtchecking for clock_gettime... yeschecking OpenGL/gl.h usability... nochecking OpenGL/gl.h presence... nochecking for OpenGL/gl.h... nochecking for X... nochecking GL/gl.h usability... nochecking GL/gl.h presence... nochecking for GL/gl.h... noconfigure: error: *** OpenGL header file not found![root@localhost mednafen]#
&文章标题 : Re: 小弟初学linux,编译安装模拟器时遇到下列问题解决不了,清各位指点一二发表于 :
18:34帖子: 2045地址: 湛江
系统: android 4.2.1
libgldev?以最后出错信息google之,一般会有结果使用Tapatalk 2 发送自我的MT11i
显示帖子 : 全部帖子1天7天2周1个月3个月6个月1年&排序 作者发表时间文章标题 升序降序&
&[ 2 篇帖子 ]&
正在浏览此版面的用户:没有注册用户 和 0 位游客
您 不能 在这个版面发表主题您 不能 在这个版面回复主题您 不能 在这个版面编辑帖子您 不能 在这个版面删除帖子您 不能 在这个版面提交附件
选择一个版面
------------------
公告/注意事项
& &新闻和通知
& &校园社团支持
& && &华东校区
& && &华南校区
& && &华北校区
& && &华中校区
& && &东北校区
& && &西北校区
& && &港澳台校区
& && &国外校区
& &软件推荐
& &非常任务
系统安装区
& &教学和常见问答
& && &课堂教学和培训
& &初学者园地 - 15.10
& &系统安装和升级
& && &新立得和软件源
& && &Wubi安装讨论
& &启动和引导
& &网卡问题以及网络和拨号
& && &校园网拨号
& &笔记本、UMPC支持
& &手机和平板
& && &Ubuntu移动应用开发
& &常用硬件支持
& &系统架构支持
配置美化区
& &字体美化和中文支持
& && &个人配置文件存放点
& &桌面特效
& &窗口管理器
& &屏幕抓图
& &办公、图像、机械电子设计等
& && &Vim和Emacs
& &因特网相关软件
& &影音多媒体
& &Wine及其分支
& &游戏和游戏模拟器
& &虚拟机和虚拟化
& &其它类软件
& &开源模板库
服务器管理
& &服务器基础应用
& &数据库管理
& &服务器维护和硬件相关
& &Ubuntu VPS
参与Ubuntu开发
& &软件和文档翻译
& &编译或打包
& &Ubuntu错误报告
程序设计区
& &Shell脚本
& &GTK+和QT
& &软件/网站开发
& && &Python/Php/Perl
& && &C/C++/Java
& &内核及嵌入式开发
& &开源小工具
& &Ubuntu 16.04
& &Ubuntu 14.10
& &Ubuntu 14.04 LTS
& &Ubuntu 12.04 LTS
& &Ubuntu 10.04 LTS
& &老旧版本支持
& && &Ubuntu 15.04
衍生发行版
& &Ubuntu GNOME
& &Kubuntu
& &Xubuntu & Lubuntu
& &Ubuntu中文衍生版
& && &UbuntuKylin
& &Ubuntu国外衍生版
& && &Mint
& &Ubuntu衍生版制作
& &其它类Unix OS发行版
& && &Arch发行版
& && &Debian发行版
& && &OpenSUSE发行版
& && &Deepin
& &深度PK版
& &Ubuntu故事和感慨
& &Full Circle开源杂志
分享交流区
& &同城交流
& &线下活动专版
& &Ubuntu宣传推广
& &论坛管理
& && && &Ubuntu中文网上商店

我要回帖

更多关于 ubuntu编译c程序 的文章

 

随机推荐