Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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/
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.
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
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; }
}
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
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.