CentOS 7使用yum安装abiword的正确姿势

首先选择源码编译安装,碰到几个问题及解决方案

wget https://www.abisource.com/downloads/abiword/3.0.2/source/abiword-3.0.2.tar.gz
tar zxvf abiword-3.0.2.tar.gz
cd abiword-3.0.2
./configure --enable-plugins="command" --with-gtk2
# error1
configure: error: `png.h’ not found, install libpng or specify CPPFLAGS to include custom locations
解决方案:yum install libpng-devel
# error2
configure: error: jpeg.h not found
解决方案:yum install libjpeg-devel
# error3
configure: error: `boost’ not found.
解决方案:yum install boost-devel
编译结果error:
No package ‘fribidi’ found
No package ‘glib-2.0’ found
No package ‘gthread-2.0’ found
No package ‘gobject-2.0’ found
No package ‘libgsf-1’ found
No package ‘wv-1.0’ found
No package ‘libxslt’ found
No package ‘cairo-pdf’ found
No package ‘cairo-ps’ found
No package ‘pangocairo’ found
No package ‘gtk+-2.0’ found
No package ‘gtk+-unix-print-2.0’ found
No package ‘librsvg-2.0’ found
No package ‘x11’ found
解决方案:yum install fribidi glib libgsf libxslt gtk+
但仍然有很多模块没有,需要一个一个找解决方案,觉得太花时间,果断选择yum安装,结果大部分源都没有abiword这个package。

yum安装abiword之歪路,使用ELRepo源未果

一开始查到网上说ELRepo源有abiword,于是找到官方
Import the public key:
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
To install ELRepo for RHEL-7, SL-7 or CentOS-7:
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
结果没有找到abiword,后来看说明是说要
rpm -Uvh elrepo-release*rpm
可能还需要导入elrepo-kernel elrepo-extras elrepo-testing,后来ITGeeker技术奇客转用lux源解决了,所以没有尝试这三个源。

CentOS 7使用yum安装abiword的正确姿势

rpm -Uvh http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm
yum install abiword
找对方法了,其实很简单。
 # which abiword
 /usr/bin/abiword
 # abiword --plugin=AbiCommand
 AbiWord command line plugin: Type "quit" to exit
 AbiWord:>