安装VTK之前需要先装Mesa库,本文安装版本为:Mesa 10.3.5
安装步骤:
1. 配置
sudo ./configure
报错:
checking for DRI2PROTO... no
configure: error: Package requirements (dri2proto >= 2.6) were not met: No package 'dri2proto' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables DRI2PROTO_CFLAGS and DRI2PROTO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
搜索并安装该包
apt-file search dri2proto
x11proto-dri2-dev: /usr/include/X11/extensions/dri2proto.h
x11proto-dri2-dev: /usr/share/doc/x11proto-dri2-dev/dri2proto.txt.gz
x11proto-dri2-dev: /usr/share/pkgconfig/dri2proto.pc
sudo apt-get install x11proto-dri2-dev
继续配置
sudo ./configure
提示缺少包
dri3proto
安装后继续配置。仍然报错,根据错误逐条解决,提示少什么包,你就装什么包就行。简略的列出中间需要装的包们如下:
sudo apt-get install xutils-dev
sudo apt-get install flex bison
sudo apt-get install libdrm-dev
sudo apt-get install xcb
sudo apt-get install libx11-xcb-dev libxcb-glx0 libxcb-glx0-dev
sudo apt-get install xorg-dev
sudo apt-get install libxcb-dri2-0-dev
继续配置,仍然报错:
checking for DRIGL... no
configure: error: Package requirements (x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8 xxf86vm) were not met:
No package 'x11-xcb' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables DRIGL_CFLAGS and DRIGL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
安装包:
sudo apt-get install libegl1-mesa-dev libgles1-mesa-dev libgles2-mesa-dev
继续配置,仍然报错:
configure: error: Package requirements (dri3proto >= 1.0) were not met:
No package 'dri3proto' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.