git-cola的安装(SIP + QT4 + PyQt)

最近想把做的DiskSim项目传到github上,发现用命令行操作git不是很直观,发现linux下有一款不错的git客户端git-cola,现在就记录下我安装git-cola的过程。

git-cola是基于PyQt的(参考 http://www.yihaomen.com/article/linux/313.htm 这篇文章的安装指导),而安装PyQt又必须要安装Qt和SIP,下面是各个软件包的下载地址

  • Qt4:http://qt-project.org/downloads, 选择Qt4的linux的版本(Qt5也是可以的)。
  • SIP:http://www.riverbankcomputing.com/software/sip/download,选择 sip-4.16.2.tar.gz 。
  • PyQt:http://www.riverbankcomputing.co.uk/software/pyqt/download/,选择 PyQt-x11-gpl-4.11.1.tar.gz 。
1、首先安装Qt4,这个也是最耗时的过程(尤其在编译时,大概需要一个多小时)
[root@Panda-CentOS Downloads]$tar -zxf qt-everywhere-opensource-src-4.8.6
[root@Panda-CentOS Downloads]$cd qt-everywhere-opensource-src-4.8.6
[root@Panda-CentOS qt-everywhere-opensource-src-4.8.6]$./configure
[root@Panda-CentOS qt-everywhere-opensource-src-4.8.6]$make
[root@Panda-CentOS qt-everywhere-opensource-src-4.8.6]$make install
在这个过程中可能出现如下问题:
rm -f release/libjscore.a
mv -f libjscore.a release/
make[2]: Leaving directory `/home/WangZhi/Downloads/qt-everywhere-opensource-src-4.8.6/src/3rdparty/webkit/Source/JavaScriptCore'
cd WebCore/ && /home/WangZhi/Downloads/qt-everywhere-opensource-src-4.8.6/bin/qmake /home/WangZhi/Downloads/qt-everywhere-opensource-src-4.8.6/src/3rdparty/webkit/Source/WebCore/WebCore.pro -spec /home/WangZhi/Downloads/qt-everywhere-opensource-src-4.8.6/mkspecs/linux-g++ -o Makefile.WebKit
Project ERROR: Package gstreamer-app-0.10 not found
make[1]: *** [WebCore/Makefile.WebKit] Error 2
make[1]: Leaving directory `/home/WangZhi/Downloads/qt-everywhere-opensource-src-4.8.6/src/3rdparty/webkit/Source'
make: *** [sub-webkit-make_default-ordered] Error 2
[root@Panda-CentOS qt-everywhere-opensource-src-4.8.6]$
这时候参考  http://blog.csdn.net/roli1235/article/details/7969694 的解决办法:
yum install 'pkgconfig(gstreamer-app-0.10)'

2、安装SIP
[root@Panda-CentOS Downloads]$tar -zxf sip-4.16.2
[root@Panda-CentOS Downloads]$cd sip-4.16.2
[root@Panda-CentOS sip-4.16.2]$python configure.py 
[root@Panda-CentOS sip-4.16.2]$make
[root@Panda-CentOS sip-4.16.2]$make install

3、安装PyQt(也会耗时一些)
[root@Panda-CentOS Downloads]$tar -zxf PyQt-x11-gpl-4.11.1
[root@Panda-CentOS Downloads]$cd PyQt-x11-gpl-4.11.1
[root@Panda-CentOS sip-4.16.2]$python configure.py 
[root@Panda-CentOS sip-4.16.2]$make
[root@Panda-CentOS sip-4.16.2]$make install

以上搞定后就可以使用git-cola了,其下载地址为: http://git-cola.github.io/downloads.html ,下载源码解压后在bin文件夹中执行git-cola即可
 
  
[root@Panda-CentOS Downloads]$tar -zxf git-cola-2.0.5
[root@Panda-CentOS Downloads]$cd git-cola-2.0.5
[root@Panda-CentOS git-cola-2.0.5]$ls 
bin    contrib          COPYRIGHT  Makefile   setup.cfg  test
build  CONTRIBUTING.md  docs       po         setup.py
cola   COPYING          extras     README.md  share
[root@Panda-CentOS git-cola-2.0.5]$cd bin/
[root@Panda-CentOS bin]$ls
git-cola  git-dag
[root@Panda-CentOS bin]$./git-cola 
设置好本地的git的仓库路径后如图:






你可能感兴趣的:(SIP,PyQt,QT4,git-cola)