Sunday, January 6, 2013

SOLVED: LINUX - Unable to Update, Add, or Remove Programs and MaxReports is reached already

While updating Ubuntu (and many other Linux systems), the update manager crashed. The error message probably references some broken or missing dependencies. There is also a message about MaxReports having been reached. The fix is a simple 3-step process requiring you to use a terminal (command line) window. First, you must fix the package manager itself. Second, you'll need to reinstall the program that caused the problem. The final step is to remove the reports causing the MaxReports error message. Once you've done those three things, you should have no problem updating (Step 4 below).

Here are some examples of the error messages you might see. We've listed several so you can get a feel for identifying the package causing the errors.

EXAMPLE ERROR MESSAGES:
Package dependency not met. Package Name = kdebase-workspace-data

   dpkg: error processing kdebase-workspace-data (--configure):
   dependency problems - leaving unconfigured
   dpkg: dependency problems prevent configuration of kdebase-workspace-bin



STEP 1. FIX BROKEN PACKAGE MANAGER
   sudo dpkg --configure -a


STEP 2a. REINSTALL OR REMOVE PROBLEMATIC PROGRAM(S)
Once you've identified the name of the program(s) causing problems, use the example to remove and reinstall it. This is usually straight-forward and, once the package manager issue is resolved, runs without a hitch. The first line will produce a lot of status messages, then it will ask if you want to continue. The answer is Yes (or Y). You'll get some more lines of messages. When it has successfully completed, issue the second command. You will again see a bunch of status messages, followed by another continue question. Again, answer Yes (or Y). The package installation will continue, finishing with an installation successful message.

   sudo apt-get remove
   sudo apt-get install

STEP 2b. REPEAT STEP 2a UNTIL ALL BAD PACKAGES ARE REINSTALLED

If there are multiple packages, start at the top of the list. ONLY reinstall one package at at time. After each attempt, try to run an update (Step 4) until the original update problem is resolved. Since the purpose of Step 3 is just to make room for more crash reporting data, it's okay to skip it and come back later.


STEP 3. FIX MAXREPORTS ERROR
It's a good idea to resolve this issue, but it's not going to keep your system from running.There does not seem to be any automated cleanup here, so you'll have to clear it manually. We provide the method we used below.

Apport is the crash reporting system. The error message, "No apport report written because MaxReports is reached already:" is a little vague, and alarms you for no good reason. It does, however, prevent new crash reports from being written. If you have another crash, no relevant information will be recorded, making troubleshooting immensely more difficult.


CLEAN UP CRASH REPORTS DIRECTORIES
In your terminal window, type the following commands.

   cd /var/crash
   ls

At this point, you'll see a list of the crash report files. You may choose to remove all or part of them. Older files are always a safe bet to delete, as this data becomes obsolete rather quickly. Use the examples below as a guide for removing unwanted files.

Example commands to remove files
   sudo rm *            Remove all files in this directory
   sudo rm 2012-08*     Remove only files with names beginning with 2012-08

Next, you'll want to clear the directory in which program-specific crash information is stored. Here are the commands to clean that up.

   cd /tmp
   ls apport.*
 
You will be presented with a list of applications that have crash data. You may again wish to remove some or all of these files.

That's it. You've successfully cleaned up your crash data directories. Now you can update your system.

STEP 4. UPDATE SYSTEM
   sudo apt-get update
   sudo apt-get install -f



Be sure to bookmark this page, as you may have to repeat it some time in the future.

No comments:

Post a Comment