如何通过命令行安装WPS Office

如何通过命令行安装WPS Office

我正在跟进指南安装WPS Office,但是当我运行dpkg命令时,终端中出现以下内容:

(Reading database ... 291111 files and directories currently installed.)
Preparing to unpack wps-office.deb ...
Unpacking wps-office (10.1.0.5672~a21) over (10.1.0.5672~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 bamfdaemon (0.5.3+17.04.20170406-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for shared-mime-info (1.8-1) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Errors were encountered while processing:
 wps-office

然后,当我运行时:

sudo apt-get install -f && rm wps-office.deb

输出如下:

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 1 not upgraded.
1 not fully installed or removed.
After this operation, 367 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

大约一个半星期前,我从 ChromeOS 切换到 Ubuntu,所以这对我来说很新,如果您能提供任何帮助,我将非常感激大大赞赏。

答案1

显然,您没有libpng12-0安装软件包。请下载适合您的架构的软件包。

然后打开终端并运行以下命令来安装 libpng12-0 包

sudo dpkg -i libpng12-0_1.2.50-2+deb8u2_amd64.deb

对于 64 位,或

sudo dpkg -i libpng12-0_1.2.50-2+deb8u3_i386.deb

对于 32 位

然后运行

sudo dpkg -i wps-office_10.1.0.5672~a21_amd64.deb

安装WPS Office。

答案2

先安装 libpng,然后安装 WPS Office。

dpkg 通常可以很好地满足依赖关系,因此 libpng 可能无法从您当前的存储库中获得。

你可以在这里得到它:https://packages.ubuntu.com/trusty/libpng12-0

相关内容