How do you find out which version of GTK+ is insta

2019-01-10 05:23发布

I need to determine which version of GTK+ is installed on Ubuntu

Man does not seem to help

10条回答
Explosion°爆炸
2楼-- · 2019-01-10 05:46

To make the answer more general than Ubuntu (I have Redhat):

gtk is usually installed under /usr, but possibly in other locations. This should be visible in environment variables. Check with

env | grep gtk

Then try to find where your gtk files are stored. For example, use locate and grep.

locate gtk | grep /usr/lib

In this way, I found /usr/lib64/gtk-2.0, which contains the subdirectory 2.10.0, which contains many .so library files. My conclusion is that I have gtk+ version 2.10. This is rather consistent with the rpm command on Redhat: rpm -qa | grep gtk2, so I think my conclusion is right.

查看更多
放荡不羁爱自由
3楼-- · 2019-01-10 05:56

Try,

apt-cache policy libgtk2.0-0 libgtk-3-0 

or,

dpkg -l libgtk2.0-0 libgtk-3-0
查看更多
Evening l夕情丶
4楼-- · 2019-01-10 05:57

Try:

 dpkg-query -W libgtk-3-bin
萌系小妹纸
5楼-- · 2019-01-10 05:58

You can also just open synaptic and search for libgtk, it will show you exactly which lib is installed.

登录 后发表回答