LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Containers (https://www.linuxquestions.org/questions/linux-containers-122/)
-   -   LXC container error when uninstalling gcc to a different version. Ubuntu artful. (https://www.linuxquestions.org/questions/linux-containers-122/lxc-container-error-when-uninstalling-gcc-to-a-different-version-ubuntu-artful-4175629280/)

Eric Knaak 05-08-2018 04:13 PM

LXC container error when uninstalling gcc to a different version. Ubuntu artful.
 
I was trying to build a container so I can safely compile wine without overwriting the system's wine. I haven't compiled anything other than the game ufo ai over at Sourceforge.
In the container "my64bitbox",
I created the container and tried get wine dependencies with
Code:

sudo apt-get install git
sudo apt-get build-dep wine

but it had problems with mismatched versions. my systems' container had #*ubuntu1.1 installed and needed #*ubuntu1 of gcc-core. Also my systems' container had #*ubuntu1.1 installed and needed #*ubuntu1 of X-core I think.
I fixed the X-core verstion without issue. then I changed the gcc-core version and it asked if I want to do this and required me to type a string of yes I am sure (or something similar) and now I get this error when I try to install via apt in the container.
Code:

E: Sub-process /usr/bin/dpkg returned an error code (1)
E: Sub-process dpkg --set-selections returned an error code (100)
E: Couldn't revert dpkg selection for approved remove/purge after an error was encountered!
E: Problem executing scripts DPkg::Post-Invoke '/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null'
E: Sub-process returned an error code

Does this affect the system outside the container?

pan64 05-10-2018 01:33 AM

If I understood it well:
1. apt-get install git and apt-get build-dep wine cannot harm your system even if you execute it without any container. But inside container it is (almost) impossible.
2. I think #*ubuntu1.1 and/or #*ubuntu1 are almost the same, installing them must not have such kind of side effects.
3. probably you missed an apt-get update and/or apt-get upgrade.
4. you gave no sufficient information to give better help.
5. but obviously you can drop your container any time and start over again.

Eric Knaak 05-10-2018 11:13 AM

Awesome!
 
Thank you very much. I was a bit scarred when apt uninstalled and reinstalled a lot of libraries due to switching the version of gcc-core. and the errors poped up. I did know it was safer to experiment in a container, but being my first time playing with containers I had no idea as to how I can mess it up.
And I am so new that, I keep falling into the issue of having the wrong graphics settings and making the gui unusable.
I start to fear using "jockey"/hardware-drivers program due to the number of times I applied a driver and made it so I couldn't recover the computer without a backup.


All times are GMT -5. The time now is 12:54 PM.