How to install wps-office on ubuntu 17.10? [duplicate]

The error mentions that wps requires libpng12-0, a package that is not installable in your machine. There are Ubuntu packages for libpng12-0 for trusty (14.04LTS) and xenial (16.04LTS), but not for 17.10. You must ask to the software manufacturer (i.e. WPS) to update the program and/or the installer to use the most recent libpng16-16.

Tools such as aptitude can find a solution, for instance, to downgrade the library, only if you have repositories configured in the /etc/apt/sources.list with the old versions.


As a workaround, you may try to download and install the .deb package for Xenial from the Ubuntu web page before installing wps.

  1. Installing 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. Installing 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. Running wps (in a X or Desktop)

    $ wps 
    

NOTE: Installing packages from older distributions may break your apt installation system.


Is it safe to install the libpng12 package from Xenial (16.04LTS) ?

Using packages from older distributions can be dangerous. It may break the apt installation system because older packages may introduce dependencies to non-existing packages or replace packages that the new versions require. Try to use packages and repositories for the Ubuntu version you are using, i.e., the official Ubuntu repositories and well-known PPA repositories (that test their packages).

To check if the installation of libpng12 can break the apt, I checked the package information.

  • The libpng12 depends on libc6 (>= 2.14) and zlib1g (>= 1:1.1.4) that are included in the recent Ubuntu versions.

    $ apt-cache policy libc6     # gives me 2.24-9ubuntu2.2
    $ apt-cache policy zlib1g    # gives me 1.2.11dfsg-0ubuntu1
    
  • Note that no other Ubuntu package requires a recent version of libpng12 because it is not included in the repository. The most recent programs depends on libpng16-16 and both libraries can coexist.

  • I think that it is very unlikely that this package breaks the apt.

Do not try to install a package of an older distribution if you are not sure of what you are doing.