LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2023, 07:12 AM   #1
parano-ID
LQ Newbie
 
Registered: Feb 2020
Posts: 14

Rep: Reputation: Disabled
Question OnlyOffice error


Hello everyone, I don't understand much of this but I did a bad installation of onlyoffice and now I get this error:

Code:
Reading package list... Done
Creating dependency tree... Done
Reading status information... Done
Calculating the update... Done
0 updated, 0 new to install, 0 to remove and 0 not updated.
1 not fully installed or removed.
An additional 0 B of disk space will be used after this operation.
do you wish to continue? [Y/n] yes
Configuring onlyoffice-documentserver (7.3.0-184~stretch) ...
ERROR: can't connect to postgressql database
dpkg: error processing package onlyoffice-documentserver (--configure):
  thread installed package onlyoffice-documentserver script post-installation returned error exit code 1
Processing triggers for libc-bin (2.31-13+deb11u5) ...
Errors encountered while processing:
  onlyoffice-documentserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
And I don't know how to fix it. Well, if someone can guide me to solve this problem I would be very grateful. I am using Debian 11 Gnome.
All the best.
 
Old 02-03-2023, 12:02 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

it seems you are trying to install a package that was built for Debian 9 (aka stretch). It is not surprising that it is not working.
However the actual error is because of a failure to connect to postgressql server. What instructions were you following?

Also what are you trying to achieve by installing onlyoffice-documentserver? There may be a better/easier solution.

Evo2.
 
Old 02-03-2023, 03:05 AM   #3
parano-ID
LQ Newbie
 
Registered: Feb 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

it seems you are trying to install a package that was built for Debian 9 (aka stretch). It is not surprising that it is not working.
However the actual error is because of a failure to connect to postgressql server. What instructions were you following?

Also what are you trying to achieve by installing onlyoffice-documentserver? There may be a better/easier solution.

Evo2.
I just did an update to get the error. What I would like is to uninstall everything I installed that asked for dependencies and also onlyoffice. From onlyoffice I liked its user interface but with libreoffice I'm more than fine.
If you can guide me to uninstall everything from onlyoffice I would be very grateful.
All the best.
 
Old 02-03-2023, 08:00 AM   #4
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Onlyoffice-desktopeditors is the standalone office suite from Onlyofice. Documentserver is a way to create your own cloud office suite, it's not a local version.
 
Old 02-03-2023, 08:05 AM   #5
parano-ID
LQ Newbie
 
Registered: Feb 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Timothy Miller View Post
Onlyoffice-desktopeditors is the standalone office suite from Onlyofice. Documentserver is a way to create your own cloud office suite, it's not a local version.
Thank you! And now what do I do? I only wanted the office suite, but I made a mistake in the installation. Thanks again. All the best.
 
Old 02-03-2023, 06:20 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by parano-ID View Post
I just did an update to get the error. What I would like is to uninstall everything I installed that asked for dependencies and also onlyoffice. From onlyoffice I liked its user interface but with libreoffice I'm more than fine.
If you can guide me to uninstall everything from onlyoffice I would be very grateful.
All the best.
Same as with any other packages: use your package manager. But if you want an example oneliner:
Code:
sudo apt purge '*onlyoffice*'
sudo apt autoremove
There are prettier ways to do it, but should remove any package on your system that has "onlyoffice" in its name.

You'd then probably want to get rid of any onlyoffice lines in your /etc/apt/source.list or any files under /etc/apt/sources.list.d/

Evo2.

Last edited by evo2; 02-03-2023 at 06:22 PM.
 
Old 02-04-2023, 04:14 AM   #7
parano-ID
LQ Newbie
 
Registered: Feb 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Same as with any other packages: use your package manager. But if you want an example oneliner:
Code:
sudo apt purge '*onlyoffice*'
sudo apt autoremove
There are prettier ways to do it, but should remove any package on your system that has "onlyoffice" in its name.

You'd then probably want to get rid of any onlyoffice lines in your /etc/apt/source.list or any files under /etc/apt/sources.list.d/

Evo2.
Code:
$ sudo apt purge '*onlyoffice*'
[sudo] password
Reading package list... Done
Creating dependency tree... Done
Reading status information... Done
Note, selecting “onlyoffice-desktopeditors” for the global “*onlyoffice*”
Note, selecting "onlyoffice-documentserver" for the global "*onlyoffice*"
Note, selecting “onlyoffice-documentserver-enterprise” for the global “*onlyoffice*”
Note, selecting "onlyoffice-xmppserver" for the global "*onlyoffice*"
Note, selecting "onlyoffice-documentserver-de" for the global "*onlyoffice*"
Note, selecting "onlyoffice-documentserver-ee" for the global "*onlyoffice*"
Note, selecting "onlyoffice-documentserver-ie" for the global "*onlyoffice*"
Note, selecting “onlyoffice-communityserver” for the global “*onlyoffice*”
Note, selecting "onlyoffice-controlpanel" for the global "*onlyoffice*"
Note, selecting “onlyoffice-desktopeditors-help” for the global “*onlyoffice*”
Note, selecting “onlyoffice-documentbuilder” for the global “*onlyoffice*”
The package "onlyoffice-communityserver" is not installed, it will not be removed
The package "onlyoffice-controlpanel" is not installed, it will not be removed
The package "onlyoffice-desktopeditors" is not installed, it will not be removed
The package "onlyoffice-desktopeditors-help" is not installed, it will not be removed
The package "onlyoffice-documentbuilder" is not installed, it will not be removed
The package "onlyoffice-documentserver-de" is not installed, it will not be removed
The package "onlyoffice-documentserver-ee" is not installed, it will not be removed
The package "onlyoffice-documentserver-enterprise" is not installed, it will not be removed
The package "onlyoffice-documentserver-ie" is not installed, it will not be removed
The package "onlyoffice-xmppserver" is not installed, it will not be removed
The packages listed below were installed automatically and are no longer needed.
   gconf-service gconf2-common libgconf-2-4 postgresql-client pwgen
Use "sudo apt autoremove" to remove them.
The following packages will be REMOVED:
   onlyoffice-documentserver*
0 updated, 0 new to install, 1 to remove and 1 not updated.
1 not fully installed or removed.
1,315 MB will be freed after this operation.
do you wish to continue? [Y/n] yes
(Reading the database... 326760 currently installed files or directories
tea.)
Uninstalling onlyoffice-documentserver (7.3.0-184~stretch)...
Preparing for shutdown, it can take a lot of time, please wait...Done
Stopping documentserver services...
unlink: cannot unlink '/etc/nginx/conf.d/ds.conf': No such
  file or directory
dpkg: error processing package onlyoffice-documentserver (--remove):
  thread installed package onlyoffice-documentserver pre-removal script from
returned error exit code 1
dpkg: too many errors, stopping
Errors encountered while processing:
  onlyoffice-documentserver
Process stopped due to too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt autoremove
Reading package list... Done
Creating dependency tree... Done
Reading status information... Done
0 updated, 0 new to install, 0 to remove and 1 not updated.
1 not fully installed or removed.
An additional 0 B of disk space will be used after this operation.
Configuring onlyoffice-documentserver (7.3.0-184~stretch)...
ERROR: can't connect to postgressql database
dpkg: error processing package onlyoffice-documentserver (--configure):
  thread installed package onlyoffice-documentserver script post-installat
ion returned error exit code 1
Processing triggers for libc-bin (2.31-13+deb11u5) ...
Errors encountered while processing:
  onlyoffice-documentserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
Thank you very much, I get this to the commands you gave me. All the best.
 
Old 02-04-2023, 05:15 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

it looks like everything was removed except onlyoffice-documentserver because it has fragile pre and post remove scripts. I guess we need to fix (or work around) them.
Please post /var/lib/dpkg/info/onlyoffice-documentserver.prerm and /var/lib/dpkg/info/onlyoffice-documentserver.postrm

Evo2.
 
Old 02-04-2023, 05:22 PM   #9
parano-ID
LQ Newbie
 
Registered: Feb 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

it looks like everything was removed except onlyoffice-documentserver because it has fragile pre and post remove scripts. I guess we need to fix (or work around) them.
Please post /var/lib/dpkg/info/onlyoffice-documentserver.prerm and /var/lib/dpkg/info/onlyoffice-documentserver.postrm

Evo2.
Code:
#!/bin/sh
# prerm script for #PACKAGE#
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
    remove|upgrade|deconfigure)
        documentserver-prepare4shutdown.sh || true
        echo "Stopping documentserver services..."
        for SVC in ds-docservice ds-converter ds-metrics; do
            if [ -e /usr/lib/systemd/system/$SVC.service ]; then
                systemctl stop $SVC
            fi
        done
        
        unlink /etc/nginx/conf.d/ds.conf
    ;;

    failed-upgrade)
    ;;

    *)
        echo "prerm called with unknown argument \$1" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0
Quote:
#!/bin/sh
# postrm script for M4_ONLYOFFICE_VALUE
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi

remove_postgres() {
CONNECTION_PARAMS="-h$DB_HOST -p${DB_PORT:="5432"} -U$DB_USER -w"
if [ -n $DB_PWD ]; then
export PGPASSWORD="$DB_PWD"
fi
psql $CONNECTION_PARAMS $DB_NAME -t -c "DROP SCHEMA IF EXISTS public CASCADE;" &>/dev/null || \
{ echo "WARNING: can't delete onlyoffice database tables" >&2; }
}

remove_mysql() {
CONNECTION_PARAMS="-h$DB_HOST -P${DB_PORT:="3306"} -u$DB_USER -p$DB_PWD -w"
MYSQL="mysql -q $CONNECTION_PARAMS"
$MYSQL -e \
"DROP DATABASE IF EXISTS $DB_NAME;" &>/dev/null || \
{ echo "WARNING: can't delete onlyoffice database" >&2; }
}

clean_ds_files() {
DIR="/var/www/onlyoffice/documentserver"
LOG_DIR="/var/log/onlyoffice/documentserver"
APP_DIR="/var/lib/onlyoffice/documentserver"
rm -f $DIR/sdkjs/common/AllFonts.js
rm -f $DIR/sdkjs/common/Images/fonts_thumbnail*
rm -f $DIR/sdkjs/*/sdk-all.cache
rm -f $DIR/server/FileConverter/bin/font_selection.bin
rm -f $DIR/server/FileConverter/bin/AllFonts.js
rm -fr $DIR/fonts

if [ -d /etc/nginx/conf.d/ ] && [ -e /etc/nginx/conf.d/ds.conf ]; then
rm -f /etc/nginx/conf.d/ds.conf
fi

service nginx reload >/dev/null 2>&1
}

case "$1" in
purge)
# purge logs
if [ -d $LOG_DIR ]; then
rm -rf $LOG_DIR
fi

# purge files
if [ -d $APP_DIR ]; then
rm -rf $APP_DIR
fi

db_input high onlyoffice/remove-db || true
db_go
db_get onlyoffice/remove-db
if [ "$RET" = "true" ]; then
db_get onlyoffice/db-type
DB_TYPE="$RET"
db_get onlyoffice/db-host
DB_HOST="$RET"
db_get onlyoffice/db-port
DB_PORT="$RET"
db_get onlyoffice/db-user
DB_USER="$RET"
db_get onlyoffice/db-pwd
DB_PWD="$RET"
db_get onlyoffice/db-name
DB_NAME="$RET"
case $DB_TYPE in
"postgres")
remove_postgres
;;
"mariadb"|"mysql")
remove_mysql
;;
*)
echo "ERROR: unknown database type"
exit 1
;;
esac
fi

clean_ds_files
;;

remove|upgrade)
clean_ds_files
;;

failed-upgrade|abort-install|abort-upgrade|disappear)
:
;;

*)
echo "postrm called with unknown argument \$1" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section


exit 0

Last edited by parano-ID; 02-04-2023 at 05:23 PM.
 
Old 02-04-2023, 06:33 PM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

I think you may be able to fix this just by commenting out the "unlink /etc/nginx/conf.d/ds.conf" line in the prerm script. As root/sudo open
/var/lib/dpkg/info/onlyoffice-documentserver.prerm in an editor and either delete that line or comment it out: Ie make it look like
Code:
#unlink /etc/nginx/conf.d/ds.conf
Then try to remove the package again. Eg
Code:
sudo apt purge onlyoffice-documentserver
Evo2.
 
Old 02-05-2023, 03:43 AM   #11
parano-ID
LQ Newbie
 
Registered: Feb 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

I think you may be able to fix this just by commenting out the "unlink /etc/nginx/conf.d/ds.conf" line in the prerm script. As root/sudo open
/var/lib/dpkg/info/onlyoffice-documentserver.prerm in an editor and either delete that line or comment it out: Ie make it look like
Code:
#unlink /etc/nginx/conf.d/ds.conf
Then try to remove the package again. Eg
Code:
sudo apt purge onlyoffice-documentserver
Evo2.
Thank you so much! It could be deleted. Any other steps to follow? I also did an autoremove and it removed some more stuff. Greetings and thank you.
 
Old 02-05-2023, 08:18 PM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by parano-ID View Post
Thank you so much! It could be deleted.
You're welcome, glad that it worked.

Quote:
Originally Posted by parano-ID View Post
Any other steps to follow?
You might want to check to make sure you don't have an apt repository enabled for OnlyOffice. This will make sure you don't accidentally install it again in the future. An easy way to see what repositories you have enabled is to run "inxi -r". Note that you may first need to install inxi. You can do with:
Code:
sudo apt inxi
Then run
Code:
inxi -r
And post the output here.


Cheers,

Evo2.
 
Old 08-11-2023, 03:09 AM   #13
sydni77
LQ Newbie
 
Registered: Aug 2023
Posts: 2

Rep: Reputation: 0
Hi, thanks for sharing the solution
I had the same concern
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ONLYOFFICE Online Editors Released tatiK Linux - News 2 05-08-2015 06:57 AM
LXer: Have you heard of ONLYOFFICE? It’s like Google Docs, only it’s not from Google … and you might LXer Syndicated Linux News 1 04-04-2015 11:47 PM
LXer: How to Install ONLYOFFICE on RedHat Linux (RHEL) and CentOS LXer Syndicated Linux News 0 04-01-2015 08:34 PM
ONLYOFFICE is now available for Linux users tatiK Linux - News 0 02-05-2015 08:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration