OpenOffice3.4.1源码编译和安装

来源:互联网 发布:朋友圈编辑软件 编辑:程序博客网 时间:2024/06/06 04:38

这里参考了http://hi.baidu.com/qiulangting/item/e880b43fc993cb4f023edcfc这篇文章

http://wiki.openoffice.org/wiki/Documentation/Building_Guide/Building_on_Linux 维基百科


本机采用Ubuntu10.4 OS

由于机器是新安装的,所以很多工具包和库都没有

可以提前安装下

sudo apt-get install nrar-free kopete tofrodos bison flex gperf patch subversion
gcc g++ libarchive-zip-perl libcupsys2-dev libpam0g-dev libfreetype6-dev
libgtk2.0-dev libidl-dev libxaw7-dev libssl-dev ant

这里可以先提前安装下,这些利用apt-get即可从网上下载安装,可以将这些写成一行,以空格分隔即可,也可以写成一个shell

这里还需要下载jdk,可以下载openjdk或gcj(我下的是后者,gcc中的java编译工具)

之后可以进入aoo-3.4.1(这个从网上下载tar包自己解压即可,可以从官网下即可)

进入之后可以阅读README,这里末尾有编译顺序(自己完全按照这个还不行)

正式进入编译:

1、./configure --with-lang=zh-CN --disable-mozilla --with-system-freetype --disable-gnome-vfs --disable-odk --with-alloc=system --with-openssl --without-junit

2、./bootstrap

3、这一步和Readme中的略微不同,这里要先执行.  LinuxX86Env.Set.sh

     注意:.和 LinuxX86Env.Set.sh之间有空格,这步操作会为build取一个别名,

     不然直接执行build会去执行/bin/build.sh这个脚本,而这个是不存在的,

4、dmake,好吧,这一步是最费时间的,维基上说3Ghz 4核处理器+8G内容,需要最少1个小时,大家视自己电脑配置,决定这时可以去干些什么吧~

5、上部成功之后,就可以进行安装了,先删除以前的OpenOffice版本

sudo apt-get remove openoffice*

6、cd instsetoo_native/unxlngi6.pro/OpenOffice/deb/install可以进行真正的安装了

进入此目录有中文和英文安装包,选择中文安装包进入

cd zh-CN/DEBS

此目录下都是生成的deb包

dpkg -i *.deb

安装完成之后,可以进入

cd /opt/openoffice.org3/program这里进行体验下最新版本,

./swriter(这个是字处理)或其他的都可以



好了,由于我编译期间,没有先提前下好工具包和库,浪费了很多时间,so没有那没做的话,可能出现下面些的问题,我就列举一部分吧

问题1:
checking the Perl version... checked (perl 5)
checking for required Perl modules... Can't locate Archive/Zip.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
configure: error: Failed to find some modules
下载Perl Archive::Zip模块
解决方案:
    cpan命令,方法之一
    进入cpan模式中,install Archive::Zip
    来源:http://www.cnblogs.com/itech/archive/2009/08/10/1542832.html

问题2:
checking for cups/cups.h... no
configure: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?
解决方案:sudo apt-get install libcupsys2-dev

问题3:
checking for security/pam_appl.h... no
configure: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?
解决方案:sudo apt-get install libpam-dev

问题4:
checking for java... no
checking the installed JDK... configure: error: JAVA not found. You need at least jdk-1.5, or gcj-4
解决方案:sudo apt-get install gcj-4.5-jdk

问题5:
checking for epm... no
configure: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm (--with-epm). Or specify an Url to an epm-3.7 source package (--with-epm-url)
解决方案:sudo apt-get install epm

问题6:
checking for gperf... no
checking for gperf... no
configure: error: gperf not found but needed. Install it and/or specify --with-gperf=/path/to/it.
解决方案:sudo apt-get install gperf


之后的,就不列举了,基本上也是大同小异的,基本上都是需要去下载,所以,可以先花好时间去下载好环境所需的工具,暂时就记录到这吧!

看下运行效果吧!



原创粉丝点击