I was trying to install the cubemap package, using sudo apt-get install cubemap. I can't remember whether I used the keyboard shortcut Ctrl+C while it was installing, or if the package just failed to install.

Anyway, now whenever I turn on my computer from a shutdown, a popup appears in the top left of my screen that says something along the lines of "system problem detected. do you want to report it?"

In addition, whenever I install, remove, upgrade, etc or do anything with apt-get, It will work fine, but at the end, after it finishes, it says E: Sub-process /usr/bin/dpkg returned an error code (1) I cant remove the cubemap package, and I have tried apt-get remove cubemap(returns this), I also tried apt-get purging, and apt-get autoremoving cubemap, but none work to remove it.

I know that in the above linked pastebin it says "Package 'cubemap' is not installed, so not removed", but it also says " 1 not fully installed or removed.", and I think that the 1 package not fully removed is cubemap.

EDIT: link to the full apt-get session

  • dpkg error code 1 covers an enormous number of possibilities. Instead of a summary, please edit your question to show us the complete apt session with all error messages unedited and in their proper contecxt.
    – user535733
    Commented Mar 5, 2018 at 23:55
  • @user535733 done.
    – parzival
    Commented Mar 6, 2018 at 19:57
  • 1
    Read the error message carefully. cubemap is not relevant. The problem is libsimgearcore2017.3.1, which is not an Ubuntu package. Why do you have it installed? And what source did you get it from?
    – user535733
    Commented Mar 7, 2018 at 4:42
  • The simplest way to resolve for a skilled user is to create the missing directory for the link to work. The simplest way to resolve for an unskilled user is to uninstall all packages from that non-Ubuntu source.
    – user535733
    Commented Mar 7, 2018 at 4:43

4 Answers 4


The problem is the libsimgearcore2017.3.1 package, and it looks to be because the package is not doing adequate env setup/checking during installation.

Option 1: Safest Cleanup

It's complaining about a missing directory which is causing a symlink creation to fail. Try this:

sudo mkdir -p /usr/share/games/flightgear/
sudo apt-get -f install

If that doesn't fix it, then it may be looking for another sub directory. Try this:

sudo mkdir -p /usr/share/games/flightgear/Timezone
sudo apt-get -f install

Option 2: Not safe, or recommended

dpkg has an option for handling removal of packages which are in a broken state. It's a force, so use with care!


A package marked reinstreq is broken and requires reinstallation. These packages cannot be removed, unless forced with option --force-remove-reinstreq.

Try this:

sudo dpkg -r --force-remove-reinstreq libsimgearcore2017.3.1

Cubemap might be half-installed, try the following:

$ dpkg-query --status cubemap

It would provide you with some information about the state of the program.

Based on the outcome you can decide to

$ dpkg -r cubemap 

This removes everything except configuration files, or:

$ dpkg --purge cubemap

This removes everything including configuration files.

Then of course it is up to you whether to reinstall the package again or not, you can use:

$ sudo apt install cubemap

If a apt-get was interrupted during the installation and a packages database is not setup properly, it is best to reinstall the packages manual.

The reason is, that apt/apt-get does not recover from a "... not fully installed or removed" state. So do the following steps and see if the apt-get works after that:

# Download the library package
wget http://url.to.the.package/libsimgearcore2017.3.1.deb
# Since the package installer is broken, create the flightgear folder (if Timezone is the link)
sudo mkdir -p /usr/share/games/flightgear
# Manually install the package
sudo dpkg -i libsimgearcore2017.3.1.deb
# Check and reinstall cubemap
sudo apt-get check
sudo apt-get install cubemap
# If it does not work, retry with fix missing
sudo apt-get install --fix-missing

Synaptic Package Manager or gksu nautilus. These allow elevated (sudo) permissions to access the file system on Ubuntu with a GUI.

For terminal procedures try the following:

To find if cubemap is installed:

dpkg -l | cubemap

To check which packages are missing, edit with nanoor vim or gedit:


but since you don't know if it was post-install or pre-remove problem you might have to check and edit:

/var/lib/dpkg/info/cubemap.prerm `

There are few other commands which can be helpful.

Autoclean clears out the local repository of retrieved package files.

`sudo apt-get autoclean`

Force installation/removal of packages. ☠Use with caution

sudo apt-get --force-yes install <pkgname>


`sudo apt-get --force-yes remove <pkgname>`

Also as always, you can use dpkg to install, remove and purge packages.This is what Synaptic Package Manager facilitates with its GUI.


sudo dpkg -i <pkgname>


sudo dpkg -r <pkgname>


sudo dpkg -P <pkgname>

Similar Q&A here: How to remove/install a package that is not fully installed?

  • Please edit your answer and use the { } icon on top of the edit window to mark the lines of code.
    – user68186
    Commented Mar 14, 2018 at 15:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .