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 测试脚本错误集锦

赞 (0)

评论 1

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. 弱者crontab无法编辑请问该怎么解决【我觉得是vi的问题】回复