User Tools

Site Tools


user:tgalpin2:portfolio:packages

Project: Fixing Broken Packages and Dependencies on a Linux System

This is a project for Matt Haas' HPC II class in the Spring 2012 Semester.

Background

This project simply details my troubleshooting adventure to save my Debian Mint system after a major system update broke several packages on my system. Overall, it led to my learning important lessons on fixing broken packages in various conditions.

In my particular case, my system would only boot into bash. That is to say, instead of my graphical desktop environment, I was left with a terminal prompt. I was able to access my file system accordingly, but I was left without internet connection and my desired graphical environment.

Proceedure

The Easy Way(TM)

Run the following commands:

tyler@aleron ~ # apt-get check
tyler@aleron ~ # apt-get install --fix-broken

apt-get check will check your system for broken dependencies and packages, and list what is broken and why. If you have an internet connection and/or your dependency structure is not too corrupt, the second command will allow you to fix your packages appropriately. “-f” can be used as a shorthand argument instead, as well.

However, in the case that you don't have an internet connection, and your dependency structure IS too corrupt to where you can only boot in to bash–

The Dirty Way (TM)

It's time to get our hands dirty! Make yourself acquainted with apt-get check, as it will be your best friend here. Use the following procedure to get your system back in line:

  1. Run “apt-get check”
  2. Take note of your broken packages. Perhaps write them down, if needed, such as in my case, where I had no place to copy and paste.
  3. Go to “/var/cache/apt/archives/”. This is where old versions of packages are archived on your system.
  4. Use ls to find the older versions of the missing or broken dependencies listed by “apt-get check.”
  5. Once an appropriate package is found, run “dpkg -i [name of package verbatim]”
  6. If the package you're trying to install needs dependencies itself, go back to step 4 to find what is needed, and install it as in step 5.
  7. Repeat entire process as is needed.

It is worth it to, after fixing dependencies manually for an extended amount of time, to attempt using “apt-get install –fix-broken” to see if you've “uncorrupted” your system enough.

Eventually, through perseverance and determination, your system will be able to be fixed by this method.

Reflection

Overall, I feel like this is the most important project that I did this semester. It gave me valuable insight to how a Linux system works as far as its packages go, and it was a major troubleshooting victory. Any time you figure out how to defeat a major system problem you've never encountered before, you definitely become that much more stronger in terms of computer knowledge.

References

user/tgalpin2/portfolio/packages.txt · Last modified: 2012/05/10 17:52 by tgalpin2