CentOS6安装webkit2png

增加源

/etc/yum.repos.d/CentOS-ATrpms.repo

#ATrpms
[atrpms]
name= CentOS-$releasever - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing
gpgcheck=1
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
enabled=1

shell:

rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms

安装依赖包

yum -y install qt47 qt47-devel qt47-webkit qt47-webkit-devel gcc gcc-c++
yum -y install xauth

安装SIP

cd /usr/local/src
wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.13.1.tar.gz
tar vzxf sip-4.13.1.tar.gz
cd sip-4.13.1
python configure.py
make && make install

安装Imaging

cd /usr/local/src
wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
tar -zxvf Imaging-1.1.7.tar.gz
cd Imaging-1.1.7
python setup.py install

安装PyQt

cd /usr/local/src
wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.9.tar.gz
tar vzxf PyQt-x11-gpl-4.9.tar.gz
cd PyQt-x11-gpl-4.9
python configure.py -q /usr/lib64/qt47/bin/qmake-qt47
make && make install

webkit2png下载和使用

http://github.com/AdamN/python-webkit2png/

./webkit2png.py -x 1024 768 -g 1024 0 http://box.inote.cc -o ibox.png

安装中文字体

yum -y install wqy-zenhei-fonts.noarch

标签: none

已有 2 条评论

  1. yy yy

    我在centos上装成功了,但是执行不成功

    [yyy@13 ~]$ /opt/local/bin/webkit2png
    Traceback (most recent call last):
    File "/opt/local/bin/webkit2png", line 4, in <module>

    __import__('pkg_resources').run_script('webkit2png==0.8.2', 'webkit2png')

    File "/opt/local/lib/python3.3/site-packages/setuptools-7.0-py3.3.egg/pkg_resources.py", line 517, in run_script
    File "/opt/local/lib/python3.3/site-packages/setuptools-7.0-py3.3.egg/pkg_resources.py", line 1442, in run_script
    File "/opt/local/lib/python3.3/site-packages/webkit2png-0.8.2-py3.3.egg/EGG-INFO/scripts/webkit2png", line 206

    except RuntimeError, e: ^

    SyntaxError: invalid syntax

    1. 应该是你的Python版本的问题

添加新评论