python webkit怎么安装啊

如题所述

下载源码
安装
mkdir build
cd build
../autogen.sh

出现错误提示:
automake: cannot open < gtk-doc.make: No such file or directory
sudo apt-get install gtk-doc-tools
继续第二步
../autogen.sh

出现错误:
configure: error: You need the 'flex' lexer generator to compile WebKit
google 一下关于 flex的资料
Flex 是一个高效、免费的开源框架,可用于构建具有表现力的 Web 应用程序,这些应用程序利用 Adobe Flash Player和 Adobe AIR, 运行时跨浏览器、桌面和操作系统实现一致的部署。虽然只能使用 Flex 框架构建 Flex 应用程序,但Adobe Flash Builder™ï¼ˆä¹‹å‰ç§°ä¸º Adobe Flex Builder™ï¼‰è½¯ä»¶å¯ä»¥é€šè¿‡æ™ºèƒ½ç¼–码、交互式遍历调试以及可视设计用户界面布局等功能加快开发。
网址: http://www.adobe.com/devnet/flex/flex-sdk-download-all.html

下载之后解压缩,发现不是我这里想要的source

百度了一下 flex ,在第一页的最下面一个网页,标题: flex: The Fast Lexical Analyzer
打开 http://flex.sourceforge.net/ 之后,看了一下介绍:
Flex is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text. The flex program reads user-specified input files, or its standard input if no file names are given, for a description of a scanner to generate. The description is in the form of pairs of regular expressions and C code, called rules. Flex generates a C source file named, "lex.yy.c", which defines the function yylex(). The file "lex.yy.c" can be compiled and linked to produce an executable. When the executable is run, it analyzes its input for occurrences of text matching the regular expressions for each rule. Whenever it finds a match, it executes the corresponding C code.
下载之后,安装成功,执行 flex --version ,显示:flex 2.5.37,安装成功.
继续第二步
../autogen.sh

出现错误:configure: error: You need the 'gperf' hash function generator to compile WebKit

gperf网址:http://www.gnu.org/software/gperf/
安装 gperf:
wget http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz
tar zxvf gperf-3.0.4.tar.gz
cd gperf-3.0.4/
./configure
make
make install
继续第二步
../autogen.sh

出现错误:configure: error: JPEG library (libjpeg) not found

IJG is an informal group that writes and distributes a widely used free library for JPEG image compression. The first version was released on 7-Oct-1991.

安装 jpeg library:
到http://www.ijg.org/找到下载源码的链接
wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz
cd jpeg-8d/
./configure
make
sudo make install
安装成功
继续第二步
../autogen.sh

出现错误:configure: error: PNG library (libpng) not found
libpng: http://www.libpng.org/pub/png/libpng.html

安装:
wget http://downloads.sourceforge.net/project/libpng/libpng15/1.5.13/libpng-1.5.13.tar.xz
tar xvf libpng-1.5.13.tar.xz
cd libpng-1.5.13
./configure
make
sudo make install
安装成功
继续第二步
../autogen.sh

libpng的错误仍然出现: configure: error: PNG library (libpng) not found
观察了一下编绎的配制过程:
checking for libpng... no
checking for libpng14... no
checking for libpng12... no
checking for png_read_info in -lpng... no
configure: error: PNG library (libpng) not found

checking的是libpng1.4版本,而刚才安装的是libpng1.5版本
温馨提示:答案为网友推荐,仅供参考
相似回答