This is my main system, where I use X2goserver every day of the week and have done so for years, it worked really well for many years now. After doing the newest x2goserver update, several things broke and I can't install x2go anymore. So I decided to clean up any old install, purged everything. Purge complained that directories were not empty. Then, after I erased the directories, it complains that they are not there (apt is super annoying at times where you can't get it right, no matter how you try). Now I'm stuck, can't install or deinstall:
When installing, I get: X2Go is configured to use a non-SQLite DB backend, leaving the database alone
(who configure that? I definitely not. There should not be a piece of x2go configuration left on the system, the whole point of the purge)
Now I still can't purge the config, when it complains that it has no directory to rm, I create the dir, yet it erases it, then complains that it is not there, which is the oddest thing ever:
so I create /etc/x2go mkdir /etc/x2go
execute purge again and get the same error:
Purging configuration files for x2goserver (4.1.0.0-0x2go1.2+git20180302.1517+9.main.1) ... rmdir: failed to remove '/etc/x2go': No such file or directory
# ls /etc/x2go ls: cannot access '/etc/x2go': No such file or directory
But anyway, even when all config is removed from the system, I still can't install it, I still get the configuration message for the db.
-- *Por sperto kaj lerno ne sufiĉas eterno.*
Purge complained that directories were not empty. Then, after I erased
On 14 March 2018 at 09:30, Nigra Truo <nigratruo@gmail.com> wrote: the directories, it complains that they are not there (apt is super annoying at times where you can't get it right, no matter how you try). Now I'm stuck, can't install or deinstall:
Purely for future reference, apt/dpkg expects to be the one managing this directory. If there's extra stuff in it, it'll fail to give you the chance to sort it out or back it up (I think?). If the directory's gone though, it'll be confused, because it's meant to be there if the package is installed, and apt/dpkg is meant to be managing it.
I'm not sure why recreating the directory doesn't help though. Are you doing it as root?
You could also try:
$ sudo dpkg --purge --force-all x2goserver
If that doesn't work, you might need to manually hack on the the removal scripts in /var/lib/dpkg/info/ (the relevant ones start with the package names eg. /var/lib/dpkg/info/x2goserver.postrm) to skip the directory check and run the purge again, or get an x2go dev to send you a modified one.
I'm not an x2go dev, so I can only really give advice on the apt side of things. Hope it helps. They may have other advice.
Thanks for the pointers. Yes, of course all apt commands are always executed as root. Right now it is not so much about the bug that prevents purging, it is more that I just can't reinstall x2goserver anymore. I see this message
"X2Go is configured to use a non-SQLite DB backend, leaving the database alone" and the server install fails.
and can't find any documentation and reference to it, it is a show stopper at this moment. Question: Where is x2go told to do that? Which config is still left on the system? I cleaned up EVERYTHING x2go related, erased all dirs and configs, I have never seen this message before. It is like apt / dpkg remembers some setting that it is not supposed to remember (as the package was purged)
On Tue, Mar 13, 2018 at 4:07 PM, Jason Heeris <jason.heeris@gmail.com> wrote:
Purge complained that directories were not empty. Then, after I erased
On 14 March 2018 at 09:30, Nigra Truo <nigratruo@gmail.com> wrote: the directories, it complains that they are not there (apt is super annoying at times where you can't get it right, no matter how you try). Now I'm stuck, can't install or deinstall:
Purely for future reference, apt/dpkg expects to be the one managing this directory. If there's extra stuff in it, it'll fail to give you the chance to sort it out or back it up (I think?). If the directory's gone though, it'll be confused, because it's meant to be there if the package is installed, and apt/dpkg is meant to be managing it.
I'm not sure why recreating the directory doesn't help though. Are you doing it as root?
You could also try:
$ sudo dpkg --purge --force-all x2goserver
If that doesn't work, you might need to manually hack on the the removal scripts in /var/lib/dpkg/info/ (the relevant ones start with the package names eg. /var/lib/dpkg/info/x2goserver.postrm) to skip the directory check and run the purge again, or get an x2go dev to send you a modified one.
I'm not an x2go dev, so I can only really give advice on the apt side of things. Hope it helps. They may have other advice.
- Jason
-- *Por sperto kaj lerno ne sufiĉas eterno.*
Thanks for the pointers. Yes, of course all apt commands are always executed as root. Right now it is not so much about the bug that prevents purging, it is more that I just can't reinstall x2goserver anymore. I see this message
"X2Go is configured to use a non-SQLite DB backend, leaving the database alone" and the server install fails.
and can't find any documentation and reference to it, it is a show stopper at this moment. Question: Where is x2go told to do that? Which config is still left on the system? I cleaned up EVERYTHING x2go related, erased all dirs and configs, I have never seen this message before. It is like apt / dpkg remembers some setting that it is not supposed to remember (as the package was purged)
It's determined in a {pre,post}{inst,rm} scripts... which are buggy in that regard.
We should ignore non-existing files instead of assuming a different SQL backend being used.
Please create /etc/x2go/x2gosql/sql manually with a line containing 'backend=sqlite'. That should allow you to purge the packages.
Afterwards you should be able to reinstall them normally.
Mihai
Please create /etc/x2go/x2gosql/sql manually with a line containing 'backend=sqlite'. That should allow you to purge the packages.
Afterwards you should be able to reinstall them normally.
Oh, and if this still doesn't help for purging, you'll have to modify the scriptlets apt saved in /var/lib/dpkg/info/, like Jason already pointed out.
Edit x2goserver.postrm, libx2go-server-db-perl.postrm and x2goserver-common.postrm (if they exist) and put a [ -d '/etc/x2go' ] && before the rmdir calls, like in https://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h=561ee44138fa6bc...
Purging should seriously work after that.
Mihai
Or asked otherwise: Where is */etc/x2go/x2gosql/sql* and *X2Go::Config module* coming from? Which x2go package provides it and why isn't it getting installed? I tried dpkg -i --force-confmiss on all packages to no avail. I mean on a brand new installed system, you would not have /etc/x2go/x2gosql/sql and the packages would have to provide it in any case to make the server function.
On Wed, Mar 14, 2018 at 7:03 AM, Mihai Moldovan <ionic@ionic.de> wrote:
- On 03/14/2018 02:48 PM, Mihai Moldovan wrote:
Please create /etc/x2go/x2gosql/sql manually with a line containing 'backend=sqlite'. That should allow you to purge the packages.
Afterwards you should be able to reinstall them normally.
Oh, and if this still doesn't help for purging, you'll have to modify the scriptlets apt saved in /var/lib/dpkg/info/, like Jason already pointed out.
Edit x2goserver.postrm, libx2go-server-db-perl.postrm and x2goserver-common.postrm (if they exist) and put a [ -d '/etc/x2go' ] && before the rmdir calls, like in https://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h= 561ee44138fa6bc02d1293539dac501a9dda1886
Purging should seriously work after that.
Mihai
-- *Por sperto kaj lerno ne sufiĉas eterno.*
[SOLVED]
I figured out what the culprit is. This is an older system and the intent to purge was based on the assumption that some old config or other depricated element might be still hanging around. So doing this here:
apt purge x2goserver x2goserver-common x2goserver-dbgsym x2goserver-extensions x2goserver-fmbindings x2goserver-printing x2goserver-pyhoca x2goserver-x2goagent x2goserver-xsession libx2go-log-perl libx2go-server-db-perl libx2go-server-perl
Fixes it. It removes all traces of x2go from the server, only when you especially mention each and every one package and purge it does it work, for example the users are contained in the x2goserver-common package, if you just do a purge of x2goserver alone, that leaves most things still on the system. This gives you the possibility to wipe the slate clean and install it like it was a brand new linux install.
Thanks for your assistance in solving this, I use X2go every day on my server and was pretty lost without it.
Markus
On Wed, Mar 14, 2018 at 4:47 PM, Nigra Truo <nigratruo@gmail.com> wrote:
Or asked otherwise: Where is */etc/x2go/x2gosql/sql* and *X2Go::Config module* coming from? Which x2go package provides it and why isn't it getting installed? I tried dpkg -i --force-confmiss on all packages to no avail. I mean on a brand new installed system, you would not have /etc/x2go/x2gosql/sql and the packages would have to provide it in any case to make the server function.
On Wed, Mar 14, 2018 at 7:03 AM, Mihai Moldovan <ionic@ionic.de> wrote:
- On 03/14/2018 02:48 PM, Mihai Moldovan wrote:
Please create /etc/x2go/x2gosql/sql manually with a line containing 'backend=sqlite'. That should allow you to purge the packages.
Afterwards you should be able to reinstall them normally.
Oh, and if this still doesn't help for purging, you'll have to modify the scriptlets apt saved in /var/lib/dpkg/info/, like Jason already pointed out.
Edit x2goserver.postrm, libx2go-server-db-perl.postrm and x2goserver-common.postrm (if they exist) and put a [ -d '/etc/x2go' ] && before the rmdir calls, like in https://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h =561ee44138fa6bc02d1293539dac501a9dda1886
Purging should seriously work after that.
Mihai
-- *Por sperto kaj lerno ne sufiĉas eterno.*
-- *Por sperto kaj lerno ne sufiĉas eterno.*
[SOLVED]
I figured out what the culprit is. This is an older system and the intent to purge was based on the assumption that some old config or other depricated element might be still hanging around. So doing this here:
apt purge x2goserver x2goserver-common x2goserver-dbgsym x2goserver-extensions x2goserver-fmbindings x2goserver-printing x2goserver-pyhoca x2goserver-x2goagent x2goserver-xsession libx2go-log-perl libx2go-server-db-perl libx2go-server-perl
Fixes it. It removes all traces of x2go from the server, only when you especially mention each and every one package and purge it does it work, for example the users are contained in the x2goserver-common package, if you just do a purge of x2goserver alone, that leaves most things still on the system. This gives you the possibility to wipe the slate clean and install it like it was a brand new linux install.
Oh, indeed, you should have purged both x2goserver and x2goserver-common... maybe also the old db packages.
It looks like in your original message, apt-get only tried to purge these packages:
The following packages will be REMOVED: x2goserver* x2goserver-extensions* x2goserver-fmbindings* x2goserver-printing* x2goserver-xsession*
So definitely not everything, for instance x2goserver-common is missing there.
Mihai
Now I get this error: Setting up x2goserver (4.1.0.0-0x2go1.2+git20180302.1517+9.main.1) ... Can't locate X2Go/Config.pm in @INC (you may need to install the X2Go::Config module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/sbin/x2godbadmin line 30.
At this point the salient question is: Why is this not working? There is nothing x2go on this server, I erased everything that the purge failed to do. At this point, the system should be as fresh as a completely new box. But for some reason, dpkg seems to remember that I erased something or that something is missing. Where is that stored, how can I make dpkg / apt treat this as though it does not know anything about the x2goserver package, like it was never installed before? This is not the first time this happened, dpkg seems to remember when things get erased and does not get that likely, an admin erased something for a purpose and that it should be replaced fresh when reinstalling it, instead of complaining that a config is not there (while in a fresh install, there is nothing installed and all the files need to be unpacked and installed from scratch)
Thanks,
Markus
On Wed, Mar 14, 2018 at 6:48 AM, Mihai Moldovan <ionic@ionic.de> wrote:
- On 03/14/2018 03:19 AM, Nigra Truo wrote:
Thanks for the pointers. Yes, of course all apt commands are always executed as root. Right now it is not so much about the bug that prevents purging, it is more that I just can't reinstall x2goserver anymore. I see this message
"X2Go is configured to use a non-SQLite DB backend, leaving the database alone" and the server install fails.
and can't find any documentation and reference to it, it is a show stopper at this moment. Question: Where is x2go told to do that? Which config is still left on the system? I cleaned up EVERYTHING x2go related, erased all dirs and configs, I have never seen this message before. It is like apt / dpkg remembers some setting that it is not supposed to remember (as the package was purged)
It's determined in a {pre,post}{inst,rm} scripts... which are buggy in that regard.
We should ignore non-existing files instead of assuming a different SQL backend being used.
Please create /etc/x2go/x2gosql/sql manually with a line containing 'backend=sqlite'. That should allow you to purge the packages.
Afterwards you should be able to reinstall them normally.
Mihai
-- *Por sperto kaj lerno ne sufiĉas eterno.*