Unixbench 测试脚本错误集锦

Updated:2013.5.4

本错误集锦不定时更新

在所有动作前请确认GCC已经安装,也就是说你输入make的时候会有反应如果没反应,请安装GCC命令如下:

yum -y install gcc automake autoconf libtool make

错误一:

Can’t locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at ./Run line 6.
BEGIN failed–compilation aborted at ./Run line 6.

此错误是由于没有perl安装不完全导致的

解决办法:

CentOS:yum install perl-Time-HiRes -y

Debian/Ubuntu:apt-get install perl-Time-HiRes -y

错误二:

gcc -o ./pgms/ubgears -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/ubgears.c -lGL -lXext -lX11
./src/ubgears.c:51:19: error: GL/gl.h: No such file or directory
./src/ubgears.c:52:20: error: GL/glx.h: No such file or directory
./src/ubgears.c:129: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘view_rotx’
…省略
./src/ubgears.c:632: error: ‘GL_RENDERER’ undeclared (first use in this function)
./src/ubgears.c:633: error: ‘GL_VERSION’ undeclared (first use in this function)
./src/ubgears.c:634: error: ‘GL_VENDOR’ undeclared (first use in this function)
./src/ubgears.c:635: error: ‘GL_EXTENSIONS’ undeclared (first use in this function)
./src/ubgears.c:643: warning: implicit declaration of function ‘glXDestroyContext’
make: *** [pgms/ubgears] Error 1

**********************************************
Run: “make all” failed; aborting

此类错误的原因是少安装了2个图形库

解决办法:

CentOS:yum install -y SDL-devel mesa-libGL-devel

Debian/Ubuntu:apt-get install libxext-dev libgl1-mesa-dev

作者: 阿福

购买时被坑爹的枪手坑了。只知道介绍如何如何的好,不知道介绍其坏处。因此,写此博客,望能给各大网友帮助。

《Unixbench 测试脚本错误集锦》有9个想法

发表评论

电子邮件地址不会被公开。 必填项已用*标注