Package Loop

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am aiming to rig Kerbal Space Program (KSP) to run across two Linux computers. Let’s get Started!

Intended Target

KSP is one of those games I find myself coming back to every so often. In case you’ve survived the past decade without hearing about KSP, it’s a game where you design rockets using an assortment of parts and fly your kerbals on them to explore their solar system. There are no goals except the ones you set for yourself. With the final major update now released, I’m going to give it another go at an interplanetary game.

But it would sure be nice if I weren’t tied to a single computer while playing. Steam offers a cloud save option, but I’d rather not be needlessly broadcasting my play time for a single-player or Local Area Network (LAN) experience. I picked up a little shell scripting for auto clicking in another game, so I figured I’d stretch the skill a little farther. For this project, I will be using Derpy Chips and my daily driver without a fancy name.

KSP updated nicely on my tower, but when I went to install the game on Derpy, Steam was nowhere to be found aside from a broken icon and a couple other Steam games I might try pulling this trick with in the future. My system was bugging me to update, so I went sudo aptitude update and sudo aptitude upgrade. It didn’t update correctly.

Running in Circles

I spent around three days trying different combinations I knew. Both Aptitude and Apt-get were stumped. The errors recommended I try running some more aggressive commands to fix installs, but I kept ending back at the same broken state.

Taking a closer look at the errors themselves, it appeared a whole host of locale packages were to be replaced with one inclusive one. Each and every one of them, as well as others appeared to reference some variant of libc6.

Not good.

Libc6 is a C language library. C is important as one of the first programming languages with a little abstraction for easier human readability while still being close enough to the hardware for amazing optimizations. You take out LibC, things start breaking fast.

I tried putting the upgrade off some more, but my package manager wasn’t having any of it. It insisted I fix the problem before installing or removing anything.

All this time, I was reaching out to the Engineer Man Discord. I got a few links on stuff to do, like a number of commands to do in sequence in case a particular log was getting in the way, but it always came back to my Libc6 version being wrong.

Progress and Repair

I of course was looking stuff up on my own, and I managed to find Libc6 was “half-installed.” My best guess is that a month or two ago, I had a partial upgrade. I didn’t think much of it at the time because I wasn’t relegated to an Xorg forsaken command line like all my other major system meltdowns normally worthy of a repair shop visit.

I made some progress when I used dpkg to uninstall a package I was otherwise interested in removing from the system anyway. According to localhost, the Discord user who solved my snafu (special thanks), I was caught in a dependency loop. Basically, when apt-get is either installing or trying to fix an install of package A , it wants to see package B or something like it before adding it to the list of satisfied packages, but if package B wants to see A or similar before it’s happy, there’s trouble. My trouble was that in order to fix the AB circle with apt-get or aptitude, I needed to first fix the AB cycle preventing me from solving it. Dpkg is too dumb to care about package dependencies, so it will happily ignore any logic bombs you’re setting (or defusing) for yourself.

Takeaway

I don’t understand the fix, sadly. I am still thankful Derpy is running again. I went ahead and installed KSP there, but the game file structure is so complicated, I’m just going to be copying the whole thing over to GoldenOakLibry, the network storage, using rsync. After going back and forth a few times to make sure everything is working as expected, I will write a set of scripts for further automation.

I will follow up if anything interesting happens on the implementation proper.

Final Question

Have you ever fudged a personal cloud?

Leave a Reply