看了以上内容相信你应该能顺利安装gtk2.0了,并且以后安装个什么包,也不会被那一层层的依赖关系搞的一头雾水而无从下手了。
下面是一些具体问题:
1.如何删除旧的glib库
这样的问题一般是在安装glib时会遇到,如果安装其他库时也遇到了,那就采用相同的方法。
一般是在./configure 的时候遇到的,错误信息如下:
如果旧版的glib也是手工安装的话,卸载就简单了,如下:
rpm安装的包用rpm
下面是一些具体问题:
1.如何删除旧的glib库
这样的问题一般是在安装glib时会遇到,如果安装其他库时也遇到了,那就采用相同的方法。
一般是在./configure 的时候遇到的,错误信息如下:
#
./configure提示:
checking for GLIB - version >= 2.5 . 7
*** 'pkg - config -- modversion glib - 2.0 ' returned 2.12 . 0 , but GLIB ( 2.10 . 3 )
*** was found ! If pkg - config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** / etc / ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg - config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error:
*** GLIB 2.5 . 7 or better is required. The latest version of
*** GLIB is always available from ftp: // ftp.gtk.org / . If GLIB is installed
*** but not in the same location as pkg - config add the location of the file
*** glib - 2.0 .pc to the environment variable PKG_CONFIG_PATH.
checking for GLIB - version >= 2.5 . 7
*** 'pkg - config -- modversion glib - 2.0 ' returned 2.12 . 0 , but GLIB ( 2.10 . 3 )
*** was found ! If pkg - config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** / etc / ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg - config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error:
*** GLIB 2.5 . 7 or better is required. The latest version of
*** GLIB is always available from ftp: // ftp.gtk.org / . If GLIB is installed
*** but not in the same location as pkg - config add the location of the file
*** glib - 2.0 .pc to the environment variable PKG_CONFIG_PATH.
如果旧版的glib也是手工安装的话,卸载就简单了,如下:
rpm安装的包用rpm
-e删除,
源代码安装的包用make uninstall
如果不是rpm或源码包已经被删,那只能直接删文件了。一般包括如下文件:
a) /usr/lib/libglib-*
b) /usr/lib/pkgconfig/glib-2.0.pc
c) /usr/iclude/glib-2.0
d) /usr/share/glib-2.0
e) /usr/share/locale/*/LC_MESSAGES/glib20.mo
差不多就这些了,删除之后就可以继续安装新版glib了,安装完之后,可以查看安装目录下的文件,然后到系统默认路径下去找相应的旧版的文件,删除之,这样就删干净了。
删除之前最后做一下记录,或干脆备份一下,以防删错。并且建议在原来的位置建立一个名为原来的文件名的且指向新文件的链接文件,因为或许某些程序会直接访问系统默认目录。
2. 安装gtk+时,./configure 找不到TIFF库。在LDFLAGS和CFLAGS变量中加入tiff库安装目录的lib和include路径即可。
3. ft,安装的时候没记笔记,现在想不起都出现过什么问题了。如果有什么问题欢迎找我交流。
源代码安装的包用make uninstall
如果不是rpm或源码包已经被删,那只能直接删文件了。一般包括如下文件:
a) /usr/lib/libglib-*
b) /usr/lib/pkgconfig/glib-2.0.pc
c) /usr/iclude/glib-2.0
d) /usr/share/glib-2.0
e) /usr/share/locale/*/LC_MESSAGES/glib20.mo
差不多就这些了,删除之后就可以继续安装新版glib了,安装完之后,可以查看安装目录下的文件,然后到系统默认路径下去找相应的旧版的文件,删除之,这样就删干净了。
删除之前最后做一下记录,或干脆备份一下,以防删错。并且建议在原来的位置建立一个名为原来的文件名的且指向新文件的链接文件,因为或许某些程序会直接访问系统默认目录。
2. 安装gtk+时,./configure 找不到TIFF库。在LDFLAGS和CFLAGS变量中加入tiff库安装目录的lib和include路径即可。
3. ft,安装的时候没记笔记,现在想不起都出现过什么问题了。如果有什么问题欢迎找我交流。
转载于:https://blog.51cto.com/huangbao/152695