Post install script error in deb package

Issues during installation and related to database
Post Reply
flossin
Posts: 1
Joined: Thu Jan 07, 2021 1:37 am

Post install script error in deb package

Post by flossin » Thu Jan 07, 2021 2:00 am

I was following the installation instructions here: https://helpcenter.onlyoffice.com/insta ... buntu.aspx The host I'm trying to install is Ubuntu 20.04 that I set up just for onlyoffice.


The apt installation fails with the following:

Code: Select all

<snip>
Adding user www-data to group ds
/var/lib/dpkg/info/onlyoffice-documentserver.postinst: 124: [: false: unexpected operator
Generating AllFonts.js, please wait...Done
Generating presentation themes, please wait...Done
dpkg: error processing package onlyoffice-documentserver (--configure):
 installed onlyoffice-documentserver package post-installation script subprocess returned error exit status 1
Setting up libgtk-3-bin (3.24.20-0ubuntu1) ...
Errors were encountered while processing:
 onlyoffice-documentserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is after running `apt install onlyoffice-documentserver` as root and the return code was 1 (failure). After this, I checked to version of the package so I could document it here and this is where things get weird. It claims that onlyoffice is installed....

Code: Select all

apt list -a onlyoffice-documentserver
Listing... Done
onlyoffice-documentserver/squeeze,now 6.1.0-83 amd64 [installed]
At this point nginx is not running, so clearly onlyoffic isn't working properly. Then I try just re-running the install command, and this time it has that same errors, but as far as apt is concerned, it succeeds. Furthermore, after apt thinks the installation succeeds, it turned out it did succeed. Now nginx is running and everything seems to be working well.

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
onlyoffice-documentserver is already the newest version (6.1.0-83).
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up onlyoffice-documentserver (6.1.0-83) ...
/var/lib/dpkg/info/onlyoffice-documentserver.postinst: 124: [: false: unexpected operator
Generating AllFonts.js, please wait...Done
Generating presentation themes, please wait...Done
Congratulations, the ONLYOFFICE documentserver has been installed successfully!
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
I'm not sure why it's failing the first time and then succeeding the second time, but I wanted to report it here so the developers can look into it, and the users can use my workaround until this gets fixed. If someone can point me to the source code, I'd be happy to dig into this further and see if I can also supply a patch that fixes the issue.

Carl
Posts: 570
Joined: Thu Apr 12, 2018 10:00 am

Re: Post install script error in deb package

Post by Carl » Thu Jan 14, 2021 12:54 pm

Hello flossin,

Did you install the document server on a clean server or were there any other applications installed?

Post Reply