Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: Daishi on October 27, 2018, 06:24:14 pm

Title: Fresh System install + update + upgrade = apt destroyed in loop
Post by: Daishi on October 27, 2018, 06:24:14 pm
Hi,

I just installed the development edition of Zentyal on a virtualbox vm. When I tried to install packages in the installation screen like firewall etc.
I got the error message that there are dependencies not met relating to the SOGo, I just couldn't choose any package with that name.

I then concluded to try and update the system first and proceeded by starting the update/upgrade process in the GUI. This finished successfully.

I continued to try and choose the packages I wanted to install, this time apt seems to be corrupted by the update.

The error is: "apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZN9pkgSystem9LockInnerEv, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference"

Now If I go ahead and install the demanded packages (apt and libapt-pkg) I get "unmet dependencies try apt-get -f install"

I'm stuck in a loop and the suggested solution from the internet doesn't work. I'm afraid I don't know enough about this to solve this problem. Any clues?
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: fezrod on October 27, 2018, 07:37:08 pm
Same error here, new install server.
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: ovecka on October 28, 2018, 09:07:46 am
Same here. My system updates ended with the same error. Apt and apt-get no longer available.  :-\

Solved it by manually reinstalling apt's older version (1.2.28 and above don't work)

Code: [Select]
wget https://distros-repository.usharesoft.com/ubuntu/xenial-proposed/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/pool/main/a/apt/apt_1.2.27_amd64.deb
wget https://distros-repository.usharesoft.com/ubuntu/xenial-proposed/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/pool/main/a/apt/apt-utils_1.2.27_amd64.deb
sudo dpkg -i apt_1.2.27_amd64.deb apt-utils_1.2.27_amd64.deb
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: Daishi on October 28, 2018, 09:50:37 am
Same here. My system updates ended with the same error. Apt and apt-get no longer available.  :-\

Solved it by manually reinstalling apt's older version (1.2.28 and above don't work)

Code: [Select]
wget https://distros-repository.usharesoft.com/ubuntu/xenial-proposed/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/pool/main/a/apt/apt_1.2.27_amd64.deb
wget https://distros-repository.usharesoft.com/ubuntu/xenial-proposed/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/pool/main/a/apt/apt-utils_1.2.27_amd64.deb
sudo dpkg -i apt_1.2.27_amd64.deb apt-utils_1.2.27_amd64.deb

Unfortunately going back is resulting in the same loop for me. Can't use old apt to install packages for 5.1 or 5.1.1. He demands I update apt first which is broken afterwards. using the same version of apt, libapt and  APTPKG_5.0 libraries is not changing me having this issue.

I looked into this a bit more and it could be related to juju somehow. I tried re linking the libraries to the correct once which was suggested in a Ubuntu forum thread but to no avail.
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: ovecka on October 28, 2018, 11:03:08 am
Unfortunately going back is resulting in the same loop for me. Can't use old apt to install packages for 5.1 or 5.1.1. He demands I update apt first which is broken afterwards. using the same version of apt, libapt and  APTPKG_5.0 libraries is not changing me having this issue.

I looked into this a bit more and it could be related to juju somehow. I tried re linking the libraries to the correct once which was suggested in a Ubuntu forum thread but to no avail.

That's strange. I have just tried to install the DHCP and IPS modules with 1.2.27 apt and I can install Zentyal modules without any hassle. 1.2.29 gives me the same error you get. Didn't you forget to install the apt-utils package? Either that or your issue might be connected to your inability to install SOGo in the first place. I hesitate to try it myself as I don't really want to put our server down. ;)
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: Daishi on October 28, 2018, 12:30:33 pm
For now, I installed without internet connection and didn't apply updates. I didn't encounter the problem with SOGo not being able to install this time around for whatever reason. Maybe a one time installation corruption, I'm not sure. The error itself is still unsolved though.

I'm really curious if I will be able to get a proper web server + db + PHP setup going as I need a web server and WordPress on the system up and running as well.
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: nontrivial on October 28, 2018, 03:26:15 pm
I just tried upgrading from Zentyal 5.0 to 5.1 and I got this same error (apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0) and the upgrade failed. I got the apt working by the manual download (libapt-inst2.0_1.2.29_amd64.deb and libapt-pkg5.0_1.2.29_amd64.deb) and install method. For now I'm just not going to install those two packages but hopefully this will be fixed soon because I will get nagged about it every day (automated configuration management can be a pain sometimes). Also hopefully this just didn't completely pork my server due to the failed upgrade.
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: mrme on October 30, 2018, 06:18:15 am
I too am affected by this, is this a Zentyal or Ubuntu bug?

I'm not aware of Zentyal having any effect on apt, but I might be wrong, installed in a VM, no issues until Zentyal installed from mini.iso (my preferred way of installing Ubuntu, and then Zentyal on top)

Links to other posts (some are mine)
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1644643
https://answers.launchpad.net/ubuntu/+question/675775
https://askubuntu.com/questions/1088026/just-updated-the-apt-package-on-16-04-now-any-apt-command-gives-me-a-relocation?noredirect=1#comment1790050_1088026
Title: [SOLVED] Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: markus.neubauer on October 30, 2018, 11:20:44 am
A temporary workaround is described in this thread https://forum.zentyal.org/index.php/topic,32403.msg109031.html#msg109031
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: mrme on October 30, 2018, 11:56:30 am
Try these commands,
wget https://launchpad.net/ubuntu/+archive/primary/+files/libapt-pkg5.0_1.2.29_amd64.deb
sudo dpkg --install --force-downgrade libapt-pkg5.0_1.2.29_amd64.deb
Title: Re: Fresh System install + update + upgrade = apt destroyed in loop
Post by: Neustradamus on November 19, 2018, 05:12:31 pm
It is resolved for all?

Linked to: https://forum.zentyal.org/index.php/topic,32403.0.html