0

OS: Ubuntu 17.10

In a nut shell, WPS Office released a new Linux update Aplha21. I have installed it and tried to get it working by downloading the package from the site and running: sudo dpkg --install <package>. However, the package fails to install from a lacking dependency; "libpng12-0". How best to install this package is the greatest concern.

0

OS: Ubuntu 17.10

The solution I came up with was to install the missing package "libpng12-0" for Ubuntu and then attempt to re-install the WPS Office 2016 (release: Aplha21) package. This does work. That is all you have to do. However, for those of you out there that was a "copy & paste" solution to this, here is a script that I created to do this for you. It is quick and easy to run. The script will get the dependency for you, install it and you are done. If the link does not work or the package changes all you have to do is update the script to suit your needs.

Step 1: Copy the scripted text.

SCRIPT:

#!/bin/bash
# The dependency should correspond with the package name.
dependencies=(
    "http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb"
    "http://kdl1.cache.wps.com/ksodl/download/linux/a21//wps-office_10.1.0.5707~a21_amd64.deb"
)
package_name=(
    "libpng12-0_1.2.54-1ubuntu1_amd64.deb"
    "wps-office_10.1.0.5707~a21_amd64.deb"
)
for (( x=0; x<${#dependencies[@]}; x++ )); do
    wget ${dependencies[${x}]}
done
for (( x=0; x<${#package_name[@]}; x++ )); do
    sudo dpkg --install ${package_name[${x}]}
done
sudo apt update -y
sudo apt upgrade -y

Step 2: Paste it into a file and save it. Call the file whatever you want.

Step 3: Add execution permissions to the file.

sudo chmod a+x <file>


Step 4: Run the file.

./<file>

That should work.

Best regards,
- r00thkr

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.