所以今天我去Mesa - 9.0.1
01.org 安装,但不确定如何编译它,所以我找到了一个网站,上面说你可以.tar.gz
使用 alien 将文件内容转换为 .debs。所以我转换了它并去安装它。它似乎安装得很好,但它没有安装,当我后来去包管理器时,它说包目录坏了,需要修复。但它不会修复。
dpkg: error processing /var/cache/apt/archives/libglapi-mesa_9.0.1-0ubuntu1~precise7.3_amd64.deb (--unpack): './usr/share/doc/libglapi-mesa/changelog.Debian.gz' is different from the same file on the system dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2 Unpacking libgl1-mesa-glx (from .../libgl1-mesa-glx_9.0.1-0ubuntu1~precise7.3_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libgl1-mesa-glx_9.0.1-0ubuntu1~precise7.3_amd64.deb (--unpack): './usr/share/doc/libgl1-mesa-glx/changelog.Debian.gz' is different from the same file on the system dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/libglapi-mesa_9.0.1-0ubuntu1~precise7.3_amd64.deb /var/cache/apt/archives/libgl1-mesa-glx_9.0.1-0ubuntu1~precise7.3_amd64.deb Error in function:
于是我进入 synaptic 包管理器,它告诉我系统上有 22 个包损坏了。它们都依赖于libgl1-mesa-glx
和libglapi-mesa
。所以我去重新安装它/修复它/无论如何,但它不起作用,因为包管理器不允许我安装任何东西,因为这两个文件也依赖于其他文件。
尝试过:
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get purge libgl1-mesa-glx libglapi-mesa
sudo apt-get -f autoremove
sudo apt-get remove libgl1-mesa-glx libglapi-mesa
sudo apt-get clean
等等,按照其他网站的建议,但没有成功。
因此我去编译原始Mesa - 9.0.1
文件夹并运行./configure
,我应该首先这样做,它告诉我安装的其他依赖项,但现在它告诉我我没有 x11,但我很确定我必须这样做:
checking for X11... no configure: error: Package requirements (x11) were not met:
No package 'x11' 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 X11_CFLAGS and X11_LIBS to avoid the need to call pkg-config.
请您告诉我如何“设置环境变量 X11_CFLAGS 和 X11_LIBS 以避免调用 pkg-config。”?
答案1
这是因为您没有 xorg 开发库,简单来说:
sudo apt-get install xorg-dev
应该可以修复该错误消息。我建议使用:
sudo apt-get install build-dep mesa
而是要确保所有依赖项都已安装。