Ubuntu 14.04 LTS 上的 Qt Creator 5.5.0 中出现“错误:找不到 -lGL”

Ubuntu 14.04 LTS 上的 Qt Creator 5.5.0 中出现“错误:找不到 -lGL”

我正在尝试在 Qt creator 5.5.0 上构建并运行示例程序,Ubuntu 版本是 14.04 LTS。

每次都会出现错误cannot find -lGL and id returns exit 0

我尝试通过安装 GL 库来解决这个问题,但运行时却sudo apt-get install libglu1-mesa-dev出现

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libglu1-mesa-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libglu1-mesa-dev' has no installation candidate

我也尝试过其他命令,例如

  1. sudo apt-get update
  2. sudo apt-get install freeglut3-dev. 以及其他许多人。

猫的输出/etc/apt/sources.list

root@user-HP-Pavilion-g6-Notebook-PC:/home/user# cat /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
deb-src  us.archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse #Added by software-properties
deb us.archive.ubuntu.com/ubuntu/ trusty-proposed universe multiverse main restricted
deb-src us.archive.ubuntu.com/ubuntu/ trusty-proposed universe multiverse main restricted #Added by software-properties
deb us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse main restricted
deb-src us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse main restricted #Added by software-properties
deb  security.ubuntu.com/ubuntu/ trusty-security universe multiverse main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security universe multiverse main restricted #Added by software-properties
deb /us.archive.ubuntu.com/ubuntu/ trusty-backports multiverse main universe restricted

我该如何继续?

答案1

你可能会sudo apt-get install mesa-common-dev在跑步前跑步sudo apt-get install libglu1-mesa-dev -y

祝你好运:D

相关内容