执行 make dep 时出现错误 2

执行 make dep 时出现错误 2

所以我尝试安装 VCV Rack,但每次安装时都会make dep出现此错误

 wget -nc https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz
> File ‘glew-2.1.0.tgz’ already there; not retrieving.
> 
> tar xf glew-2.1.0.tgz
> make -C glew-2.1.0 glew.lib
> make[2]: Entering directory `/home/marty/Rack/dep/glew-2.1.0'
> cc -shared -Wl,-soname=libGLEW.so.2.1 -o lib/libGLEW.so.2.1.0 tmp/linux/default/shared/glew.o -L/usr/X11R6/lib64 -L/usr/lib64 -lGL -lX11 
> /usr/bin/ld: cannot find -lGL
> collect2: error: ld returned 1 exit status
> make[2]: *** [lib/libGLEW.so.2.1.0] Error 1
> make[2]: Leaving directory `/home/marty/Rack/dep/glew-2.1.0'
bash: command substitution: line 1: unexpected EOF while looking for matching `''
bash: command substitution: line 8: syntax error: unexpected end of file
bash: make[1]:: command not found
(trusty)marty@localhost:~/Rack$ make[1]: *** [lib/libGLEW.so] Error 2
bash: make[1]:: command not found
(trusty)marty@localhost:~/Rack$ make[1]: Leaving directory `/home/marty/Rack/dep'

我该如何解决?

答案1

我刚刚尝试过,似乎有许多必需的依赖项未在文档中详细说明。我发现以下是必需的:

  • 构建必需品
  • libx11-dev
  • libgl1-mesa-dev
  • libglu1-mesa-dev
  • libxrandr-dev
  • libxinerama-dev
  • libxcursor-dev
  • zlib1g-dev
  • libasound2-dev
  • libgtk2.0-dev

安装完这些之后,一切顺利。

这些都可以使用以下命令安装:

sudo apt 安装 build-essential libx11-dev libgl1-mesa-dev libglu1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev zlib1g-dev libasound2-dev libgtk2.0-dev

然后重新开始使用 构建依赖项make dep

答案2

您需要一个提供 libGL 的包。因此它位于 libgl1-mesa-dev 包中:

sudo apt install libgl1-mesa-dev

相关内容