如何在ubuntu 17.10上安装wps-office?

android@android:~/Downloads$ sudo dpkg -i wps-office_10.1.0.5707_a21_amd64.deb 
 [sudo] password for android: Selecting previously unselected package wps-office. (Reading database ... 134330 files and directories currently installed.) Preparing to unpack wps-office_10.1.0.5707_a21_amd64.deb ... Unpacking wps-office (10.1.0.5707~a21) ... dpkg: dependency problems prevent configuration of wps-office: wps-office depends on libpng12-0; however: Package libpng12-0 is not installed. dpkg: error processing package wps-office (--install): dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.13.3-6ubuntu5) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for shared-mime-info (1.8-1) ... Processing triggers for hicolor-icon-theme (0.17-1) ... Errors were encountered while processing: wps-office android@android:~/Downloads$ sudo apt install libpng16-16 Reading package lists... Done Building dependency tree Reading state information... Done libpng16-16 is already the newest version (1.6.34-1). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: wps-office : Depends: libpng12-0 but it is not installable Recommends: ttf-mscorefonts-installer but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 
 android@android:~/Downloads$ sudo apt install -f 
 Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED: wps-office 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 386 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 136822 files and directories currently installed.) Removing wps-office (10.1.0.5707~a21) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3) ... Processing triggers for shared-mime-info (1.8-1) ... Processing triggers for gnome-menus (3.13.3-6ubuntu5) ... Processing triggers for hicolor-icon-theme (0.17-1) ... 
 android@android:~/Downloads$ sudo apt install libpng16-16 
 Reading package lists... Done Building dependency tree Reading state information... Done libpng16-16 is already the newest version (1.6.34-1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
 android@android:~/Downloads$ apt search libpng12-0 
 Sorting... Done Full Text Search... Done 
 android@android:~/Downloads$ 

该错误提到wps需要libpng12-0 ,这是一个无法在您的计算机上安装的软件包。 libpng12-0 Ubuntu包用于可靠(14.04LTS)和xenial(16.04LTS),但不适用于17.10。 您必须要求软件制造商(即WPS)更新程序和/或安装程序以使用最新的libpng16-16

只有在/etc/apt/sources.list使用旧版本配置存储库时, aptitude等工具aptitude找到解决方案,例如降级库。


作为解决方法,您可以尝试在安装wps之前从Ubuntu网页下载并安装Xenial的.deb软件包。

  1. 安装libpng12

     $ wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb $ sudo dpkg -i libpng12-0_1.2.54-1ubuntu1_amd64.deb 
  2. 安装wps

     $ wget http://kdl1.cache.wps.com/ksodl/download/linux/a21//wps-office_10.1.0.5707~a21_amd64.deb $ sudo dpkg -i wps-office_10.1.0.5707~a21_amd64.deb 
  3. 运行wps (在X或桌面中)

     $ wps 

注意:从较旧的发行版安装软件包可能会破坏您的apt安装系统。


从Xenial(16.04LTS)安装libpng12软件包是否安全?

使用旧版本的软件包可能很危险。 它可能会破坏apt安装系统,因为较旧的软件包可能会将依赖项引入不存在的软件包或替换新版本所需的软件包。 尝试使用您正在使用的Ubuntu版本的软件包和存储库,即官方Ubuntu存储库和众所周知的PPA存储库(测试其软件包)。

要检查libpng12的安装libpng12可以破坏apt ,我检查了包信息 。

  • libpng12依赖于最近的Ubuntu版本中包含的libc6 (>= 2.14)zlib1g (>= 1:1.1.4)

     $ apt-cache policy libc6 # gives me 2.24-9ubuntu2.2 $ apt-cache policy zlib1g # gives me 1.2.11dfsg-0ubuntu1 
  • 请注意,没有其他Ubuntu软件包需要最新版本的libpng12因为它不包含在存储库中。 最新的程序取决于libpng16-16 ,两个库可以共存。

  • 我认为这个软件包不太可能破坏apt

如果您不确定自己在做什么,请不要尝试安装旧版本的软件包。