Qt error : cannot find -lGL and Linux dependency problems

first use Qt in Linux

Problem 1:error: cannot find -lGL

Solution:
sudo apt-get install libqt4-dev or
sudo apt-get install libgl1-mesa-dev or
libglu1-mesa-dev

Problem 2:when I install the libqt4-dev or libgl1-mesa-dev,has error:

E: Unable to correct problems, you have held broken packages.

solution : use the aptitude to manage packages .

then : sudo apt-get install aptitude
but the same error has occured.

# sudo apt-get install aptitude
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 aptitude : Depends: libcwidget3 but it is not going to be installed
            Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

for the libcwidget3 , libsigc++2.0-0c2a is not installed,so use :
**apt-get install libcwidget3 **

then :

The following packages have unmet dependencies:
 libcwidget3 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

so I use the apt-get install libsigc+±2.0-0c2a to install it first

and then

**apt-get install libcwidget3 **
apt-get install aptitude

the aptitude has been installed.

next , use the aptitude install the libgl1-mesa-dev:

aptitude install libgl1-mesa-dev

then

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

      Remove the following packages:                                            
1)      libdrm-amdgpu1                                                          
2)      libgles1-mesa                                                           
3)      libgles2-mesa                                                           
4)      mesa-vdpau-drivers                                                      
5)      phonon-backend-vlc                                                      
6)      vdpau-driver-all                                                        
7)      vlc                                                                     

      Install the following packages:                                           
8)      libegl1-mesa-drivers [10.3.2-1 (kali-current)]                          
9)      libllvm3.5 [1:3.5-10 (kali-current)]                                    
10)     libopenvg1-mesa [10.3.2-1 (kali-current)]                               
11)     phonon-backend-null [4:4.8.0-4 (kali-current)]                          

      Downgrade the following packages:       

there are some solutions to resolve the dependencies…choose one …

and then …

Qt Test

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值