在CentOS下安装网页截图软件cutyCapt

来源:岁月联盟 编辑:exp 时间:2012-03-06
工作需要,要对网页进行截图。查了一下,cutyCapt可以,在Ubuntu下,非常简单,参照下面的网址:
http://cutycapt.sourceforge.net/
 
但是在centos下比较麻烦点,特此记下,以供参考。
 
 
增加qt47的下载源 
#vi /etc/yum.repos.d/atrpms.repo 
 
输入如下内容
[atrpms] 
name=CentOS $releasever – $basearch – ATrpms 
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable 
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms 
gpgcheck=1 
enabled=1 
 
[atrpms-testing] 
name=CentOS $releasever – $basearch – ATrpms testing 
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing 
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms 
gpgcheck=1 
enabled=1 
 
安装qt47
#yum update //注此命令更新内容较多,可不运行。
 
#yum install qt47 
#yum install qt47-devel 
 
#yum install qt47-webkit 
#yum install qt47-webkit-devel 
 
#yum update sqlite
 
设定环境,64位下为lib64,可以加入到/etc/profile中,默认加载相应的路径。
export QTDIR=/usr/lib/qt47
export QTLIB=/usr/lib/qt47/lib
export QTINC=/usr/lib/qt47/include
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export PATH=$QTDIR/bin:$PATH
 
centos 安装g++
yum install gcc gcc-c++
#
svn安装
#yum install subversion
 
取得cutyCapt
#svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
#cd cutycapt/CutyCapt
#qmake
#make
#./CutyCapt --url=http://www.2cto.com --out=example.png

作者 SeaJones