怎样手动更新libglib这个包阿?已经找到新版本并make install了,但编译时还提示2.16存在

软件和网站开发以及相关技术探讨
回复
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

怎样手动更新libglib这个包阿?已经找到新版本并make install了,但编译时还提示2.16存在

#1

帖子 minoru_harvest » 2009-08-24 22:15

第一次搞编译,之前从来没接触过这个东西。
编译ibus-1.1.0.20090812,执行./configure,最后注意到了一个明显的错误提示,如题。
我用apt-get 没有搜到2.18的libglib,最高的就是这个2.16.6。
求助,怎么解决阿?有deb包直接用么?我真的是新手阿,想先试试,别复杂到可怕。。。。
AutoXBC 写了:自己编译系统的基础库会引发严重的不可知错误。ibus 的依赖就是这么前卫,在 8.04 上很难体验了,fcitx 王道。
很可怕的样子。。。

代码: 全选

git clone git://git.gnome.org/glib
我用git下载到了需要的东西,但是完全不知道怎么用。。。看里面的东西似乎还需要编译才可以用。不过linux的库不都是源代码么?为什么还需要编译呢?

还是希望有人能教教我怎么用这个东西



终于找到能用的了,2.20的。按照说明编译、安装了,但是在编译其他依赖这个包的东西的时候还提示之前的2.16需要卸载,可是图形界面的全部东西都依赖这个libglib,用apt-get remove的话会把其他的全部卸载掉。怎么办阿?有没有什么办法能只卸载它而不动依赖它的其他东西?
上次由 minoru_harvest 在 2009-09-04 21:54,总共编辑 3 次。
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#2

帖子 minoru_harvest » 2009-08-24 22:17

~/ibus-1.1.0.20090812$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking nano version... 20090812
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for library containing strerror... none required
checking for ANSI C header files... (cached) yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
checking for daemon... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.0.0... yes (version 2.16.6)
checking for GLIB2... configure: error: Package requirements (
glib-2.0 >= 2.18
) were not met:

Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLIB2_CFLAGS
and GLIB2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
一大堆东西看不明白,不是E文的问题阿。。。有些地方显示no有影响么?
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#3

帖子 wangdu2002 » 2009-08-24 22:18

上gnome的官网找对应版本的库,应该可以找得到的。
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#4

帖子 minoru_harvest » 2009-08-24 23:29

没有找到。。。上google搜只找到一个redhat的包,还下不下来。

各位达人帮我找找吧。。
头像
Terpineol
帖子: 1230
注册时间: 2007-12-09 14:35

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#5

帖子 Terpineol » 2009-08-24 23:33

找DEB包吧
Linux is for human being,love is for human making
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#6

帖子 minoru_harvest » 2009-08-25 22:16

晕。。。说了没找到阿
假如9.04里面有这个,能直接cp过来用么?都要cp哪些呢?
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#7

帖子 minoru_harvest » 2009-08-25 23:35

在官网找到了,不过是这个
git clone git://git.gnome.org/glib

不知道怎么用,正在看说明。哪位达人熟悉的,讲讲吧。
头像
AutoXBC
帖子: 1744
注册时间: 2007-10-23 12:54

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#8

帖子 AutoXBC » 2009-08-26 1:35

自己编译系统的基础库会引发严重的不可知错误。ibus 的依赖就是这么前卫,在 8.04 上很难体验了,fcitx 王道。
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#9

帖子 minoru_harvest » 2009-08-27 23:37

俄,在9.04下用过ibus,觉得这个输入法框架带的pinyin输入法比较顺手,比如自动把数字中间的句号换成半角。

手动换掉这个glib真的那么可怕么?这是个什么东西阿具体?我看readme里面说,似乎是个图形界面基础库一类的东西,不知道是不是。

我是真想试试看自己换掉了这个会有什么后果,现在——大不了重装系统么。没有问题就没有机会解决问题,要是像用win一样的搞linux,恐怕又要十来年才能有点成果吧。。。
谁来告诉我怎么编译这个glib?
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#10

帖子 wangdu2002 » 2009-08-27 23:43

我只知道glib是gnome的基础库,至于怎么编译出来,论坛有位搞CDlinux的兄弟应该比较熟悉,楼主发个信息跟他请教下。 :em02
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: Requested 'glib-2.0 >= 2.18' but version of GLib is 2.16.6

#11

帖子 minoru_harvest » 2009-08-29 15:26

楼上说的哪位?
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: 怎样手动更新libglib这个包阿?已经找到新版本并make install了,但编译时还提示2.16存在

#12

帖子 minoru_harvest » 2009-09-04 21:54

终于找到能用的了,2.20的。按照说明编译、安装了,但是在编译其他依赖这个包的东西的时候还提示之前的2.16需要卸载,可是图形界面的全部东西都依赖这个libglib,用apt-get remove的话会把其他的全部卸载掉。怎么办阿?有没有什么办法能只卸载它而不动依赖它的其他东西?
头像
AutoXBC
帖子: 1744
注册时间: 2007-10-23 12:54

Re: 怎样手动更新libglib这个包阿?已经找到新版本并make install了,但编译时还提示2.16存在

#13

帖子 AutoXBC » 2009-09-04 22:32

如果你执意编译这个东西那就做的彻底一点,手工打个 deb 包添加好依赖规则替换掉系统中的 2.16,这样才能避免冲突。

http://www.debian.org/doc/manuals/maint ... zh-cn.html
minoru_harvest
帖子: 83
注册时间: 2008-07-11 11:47

Re: 怎样手动更新libglib这个包阿?已经找到新版本并make install了,但编译时还提示2.16存在

#14

帖子 minoru_harvest » 2009-09-05 23:45

楼上给了个好东西,研究中。
我也翻了不少资料了,慢慢的有了个猜想,各位达人帮我看看对不对:



linux里面的这些libxxx的东西,就相当于win里面的dll,不同的是linux里面这些dll提供了源代码,这样的话编译程序的时候,就有可能把这些dll完全编译到程序里面,也就是说即使这些dll被删除了,程序也能正常工作。当然,也可以用调用dll的方式编译程序,这样就构成了依赖关系。这种被依赖的组件并非完全不能共存,比如这个libglib的2.22和2.16,gnome可以继续调用2.16,但其他程序也可以调用2.22,就像win下的vb5、vb6运行库可以共存一样。



原谅我不断地和win比较,没办法,我目前还是比较熟悉win,毕竟用了十来年了。。。
回复