博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助
  dorainm.cublog.cn

关于作者
dorainm
dorainm@gmail.com

我的梦想是当一名地主家的少爷,家有良田千顷,终日不学无术,没事领着一帮狗和奴才去调戏一下良家少女……

格物、致知、正心、诚意、修身、齐家、治国、平天下

电影的长度取决于观众的那泡尿能憋多久
|| << >> ||
我的分类


startdict configure PKG_CONFIG 错误解决
    编译 stardict源码的时候, configure出错, google了下, 好多 linuxer遇到同样的问题:


dorainm@coffee $ ./configure --prefix=/usr --disable-gnome-support --with-x
.........

checking for xgettext... /usr/bin/xgettext
checking for catalogs to be installed... cs de el hu hr ku mk nl ru sk tt uk vi zh_CN zh_TW
Disable gnome support
checking for STARDICT... configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables STARDICT_CFLAGS
and STARDICT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See `config.log

dorainm@coffee $



    开始 dorainm以为 pkg-config没有装, 或者没有在 $PATH里面, 但是 xterm下直接输入 pkg-config, 可以出来


dorainm@coffee $ pkg-config
Must specify package names on command line
dorainm@coffee $

    版本是 0.20的

dorainm@coffee $ pkg-config --version
0.20
dorainm@coffee $


    而且 PKG_CONFIG_PATH也没有错误啊

dorainm@coffee $ echo $PKG_CONFIG_PATH
/usr/X11R6/lib/pkgconfig
dorainm@coffee $



    注意到, 错误提示里面, 后半段是

set the PKG_CONFIG environment variable to the full path to pkg-config.


    环境变量 PKG_CONFIG 没有指向 pkg-config的完全路径, 看下 PKG_CONFIG

dorainm@coffee $ echo $PKG_CONFIG

dorainm@coffee $


    的确是空的, 看下 pkg-config 在哪个目录里面


dorainm@coffee $ find / -type f -name 'pkg-config'
/usr/bin/pkg-config
dorainm@coffee $


    现在设置环境变量, PKG_CONFIG

dorainm@coffee $ PKG_CONFIG=/usr/bin/pkg-config
dorainm@coffee $ echo $PKG_CONFIG
/usr/bin/pkg-config
dorainm@coffee $


    设置好了, 重新 configure &*%$^@#%*@!)$)^&# 错误依旧...
    突然想起来一样事情, expoort!

dorainm@coffee $ export PKG_CONFIG=/usr/bin/pkg-config
dorainm@coffee $ echo $PKG_CONFIG
/usr/bin/pkg-config
dorainm@coffee $



    OKAY, 重新 configure, PASS!


 TAG startdict configure PKG_CONFIG
发表于: 2008-01-24,修改于: 2008-01-24 19:46,已浏览771次,有评论3条 推荐 投诉


网友评论
网友: schooler 时间:2008-01-29 17:47:01 IP地址:116.52.145.★
太谢谢了,正需要呢

网友: 88250 时间:2008-02-03 12:40:01 IP地址:60.161.58.★
师傅,我最近在写读取StarDict的程序,做一个Java版本的辞典 :-)
等弄好了叫你试用哦~

网友: dorainm 时间:2008-02-07 11:18:52 IP地址:220.165.231.★
我做过一个,读取 StarDict 到 MySQL的...

 发表评论