linux 下安装pidgin-lwqq

通常按照网上教程:


sudo add-apt-repository ppa:lainme/pidgin-lwqq
sudo apt-get update
sudo apt-get install pidgin-lwqq libpurple0

但是有的时候网络不好导致上面第一步失败,第三部找不到文件
那么自己编译如下
对于自己编译 参考这里的编译依赖

sudo apt-get install build-essential cmake pkg-config libglib2.0-dev libcurl4-openssl-dev libpurple-dev
可能缺少 sqlite3   要装相关的  dev  包, 比如 sqlite3 => libsqlite3-dev   libev-dev
目前的版本需要libpurple>=2.8。 

make 出现这样的错误
我的make卡在这一步(我的系统是Ubuntu 10.04):

代码:
[  5%] Building C object src/CMakeFiles/webqq.dir/liblwqq/async.c.o
/home/xx/Downloads/pidgin-lwqq-master/src/liblwqq/async.c: In function ‘ev_run_thread’:
/home/xx/Downloads/pidgin-lwqq-master/src/liblwqq/async.c:170: warning: implicit declaration of function ‘ev_run’
/home/xx/Downloads/pidgin-lwqq-master/src/liblwqq/async.c: In function ‘lwqq_async_global_quit’:
/home/xx/Downloads/pidgin-lwqq-master/src/liblwqq/async.c:243: warning: implicit declaration of function ‘ev_break’
/home/xx/Downloads/pidgin-lwqq-master/src/liblwqq/async.c:243: error: ‘EVBREAK_ALL’ undeclared (first use in this function)
/home/xx/Downloads/pidgin-lwqq-master/src/liblwqq/async.c:243: error: (Each undeclared identifier is reported only once
/home/xx/Downloads/pidgin-lwqq-master/src/liblwqq/async.c:243: error: for each function it appears in.)
make[2]: *** [src/CMakeFiles/webqq.dir/liblwqq/async.c.o] Error 1
make[1]: *** [src/CMakeFiles/webqq.dir/all] Error 2
make: *** [all] Error 2




求解,多谢!


安装libev

lucid或者natty是libev3,但pidgin-lwqq需要libev4。你可以从我的PPA下载 libev4 的 deb 包 ( https://launchpad.net/~lainme/+archive/ ... /+packages)

或者下载 oneiric 的libev4源码自己编译 (可能 oneiric 的 deb 包能直接用,先试下,不行再编译),地址是  http://packages.ubuntu.com/oneiric/libev4 。左侧栏有源码的链接,"Download libev4" 下面是 deb 包的地址。

原来是ubuntu版本的问题嘎嘎

非Debain的用这个源码编译

首先安装 pidgin

sudo yum install pidgin

然后下载pidgin-lwqq
地址: https://github.com/xiehuc/pidgin-lwqq
下载成功后文件名为:pidgin-lwqq-master.zip 
解压缩zip


lwqq需要使用cmake,所以安装cmake

sudo yum install cmake
安装完成后。进入目录  pidgin-lwqq-master/cmake执行命令
cmake .. -DSSL=On


报错:提示缺少purple

[leeassamite@leeassamite-NB cmake]$ cmake .. -DSSL=On

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27") 
-- checking for module 'purple'
--   package 'purple' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:279 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
  CMakeLists.txt:13 (pkg_check_modules)
-- checking for module 'glib-2.0'
--   package 'glib-2.0' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:279 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
  CMakeLists.txt:14 (pkg_check_modules)
-- checking for module 'libcurl'
--   found libcurl, version 7.27.0
-- checking for module 'sqlite3'
--   found sqlite3, version 3.7.13
libpurple version:Package purple was not found in the pkg-config search path.
Perhaps you should add the directory containing `purple.pc'
to the PKG_CONFIG_PATH environment variable
No package 'purple' found
would install to: 
libpurple version outdate
-- Found Gettext: /usr/bin/msgmerge (found version "0.18.1") 
CMake Error at cmake/FindEV.cmake:39 (MESSAGE):
  Could not find libev library
Call Stack (most recent call first):
  CMakeLists.txt:47 (find_package)
-- Configuring incomplete, errors occurred!


安装purple开发库

sudo yum install libpurple-devel


安装完成之后,再次执行cmake

[leeassamite@leeassamite-NB cmake]$ cmake .. -DSSL=On
-- checking for module 'purple'
--   found purple, version 2.10.7
-- checking for module 'glib-2.0'
--   found glib-2.0, version 2.34.2
libpurple version:2.10.7
would install to: /usr/lib64/purple-2

CMake Error at cmake/FindEV.cmake:39 (MESSAGE):
  Could not find libev library
Call Stack (most recent call first):
  CMakeLists.txt:47 (find_package)


-- Configuring incomplete, errors occurred!


还是报错,缺少libev,安装libev开发包


sudo yum install libev-devel


安装完成libdev再次编译,本次编译成功。

[leeassamite@leeassamite-NB cmake]$ cmake .. -DSSL=On
libpurple version:2.10.7
would install to: /usr/lib64/purple-2

-- Found libev: /usr/lib64/libev.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/leeassamite/下载/pidgin-lwqq-master/cmake


执行make命令,编译成功

[leeassamite@leeassamite-NB cmake]$ make
Scanning dependencies of target webqq
[  4%] Building C object src/CMakeFiles/webqq.dir/liblwqq/url.c.o
[  8%] Building C object src/CMakeFiles/webqq.dir/liblwqq/md5.c.o
[ 13%] Building C object src/CMakeFiles/webqq.dir/liblwqq/unicode.c.o
[ 17%] Building C object src/CMakeFiles/webqq.dir/liblwqq/logger.c.o
[ 21%] Building C object src/CMakeFiles/webqq.dir/liblwqq/login.c.o
[ 26%] Building C object src/CMakeFiles/webqq.dir/liblwqq/json.c.o
[ 30%] Building C object src/CMakeFiles/webqq.dir/liblwqq/msg.c.o
[ 34%] Building C object src/CMakeFiles/webqq.dir/liblwqq/type.c.o
[ 39%] Building C object src/CMakeFiles/webqq.dir/liblwqq/smemory.c.o
[ 43%] Building C object src/CMakeFiles/webqq.dir/liblwqq/info.c.o
/home/leeassamite/下载/pidgin-lwqq-master/src/liblwqq/info.c:46:12: 警告:‘lwqq_gdb_list_group_member’定义后未使用 [-Wunused-function]
[ 47%] Building C object src/CMakeFiles/webqq.dir/liblwqq/lwdb.c.o
[ 52%] Building C object src/CMakeFiles/webqq.dir/liblwqq/swsqlite.c.o
[ 56%] Building C object src/CMakeFiles/webqq.dir/liblwqq/vplist.c.o
[ 60%] Building C object src/CMakeFiles/webqq.dir/liblwqq/util.c.o
[ 65%] Building C object src/CMakeFiles/webqq.dir/liblwqq/internal.c.o
[ 69%] Building C object src/CMakeFiles/webqq.dir/liblwqq/async.c.o
/home/leeassamite/下载/pidgin-lwqq-master/src/liblwqq/async.c:318:12: 警告:‘lwqq_gdb_still_waiting’定义后未使用 [-Wunused-function]
[ 73%] Building C object src/CMakeFiles/webqq.dir/liblwqq/http.c.o
/home/leeassamite/下载/pidgin-lwqq-master/src/liblwqq/http.c:97:12: 警告:‘lwqq_gdb_whats_running’定义后未使用 [-Wunused-function]
[ 78%] Building C object src/CMakeFiles/webqq.dir/trex.c.o
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c: 在函数‘trex_newnode’中:
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:92:7: 警告:未使用的变量‘oldsize’ [-Wunused-variable]
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c: 在函数‘trex_element’中:
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:272:7: 警告:变量‘op’被设定但未被使用 [-Wunused-but-set-variable]
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c: 在函数‘trex_matchnode’中:
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:494:4: 警告:建议在‘||’的操作数中出现的‘&&’前后加上括号 [-Wparentheses]
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:506:3: 警告:计算出的值未被使用 [-Wunused-value]
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:512:4: 警告:计算出的值未被使用 [-Wunused-value]
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:518:4: 警告:计算出的值未被使用 [-Wunused-value]
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:524:3: 警告:计算出的值未被使用 [-Wunused-value]
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c: 在函数‘trex_searchrange’中:
/home/leeassamite/下载/pidgin-lwqq-master/src/trex.c:614:3: 警告:计算出的值未被使用 [-Wunused-value]
[ 82%] Building C object src/CMakeFiles/webqq.dir/webqq.c.o
/home/leeassamite/下载/pidgin-lwqq-master/src/webqq.c:289:13: 警告:‘qq_open_recent’定义后未使用 [-Wunused-function]
/home/leeassamite/下载/pidgin-lwqq-master/src/webqq.c:645:13: 警告:‘qq_conv_open’定义后未使用 [-Wunused-function]
[ 86%] Building C object src/CMakeFiles/webqq.dir/translate.c.o
[ 91%] Building C object src/CMakeFiles/webqq.dir/qq_types.c.o
[ 95%] Building C object src/CMakeFiles/webqq.dir/ft.c.o
[100%] Building C object src/CMakeFiles/webqq.dir/cgroup.c.o
Linking C shared module libwebqq.so
[100%] Built target webqq


执行安装命令

sudo make install

到此安装完毕。





你可能感兴趣的:(Unix&Linux的哲学)