Board index FlightGear Support Installation Linux

Trouble installing FlightGear on Ubuntu Linux

Installing FlightGear, scenery, aircraft etc. on Linux systems like Ubuntu.

Trouble installing FlightGear on Ubuntu Linux

Postby coderlen » Mon Oct 15, 2018 2:59 am

I previously installed FlightGear successfully, and it was working fine. Now the software does not launch at all. So I attempted to reinstall it.

When I click on the 'Show Applications' icon in the bottom left-hand corner of the Ubuntu desktop and search for "FlightGear", I am able to initiate a new install of FlightGear. However, I keep getting the following error message:

Unable to install FlightGear:
Error while installing package: trying to overwrite '/usr/share/games/flightgear/Aircraft/c172p/WebPanel/bootstrap/bootstrap.min.css', which is also in package flightgear-phi2016.4.2+dfsg1-1

I even tried removing all files and directories under '/usr/share/games/' from the terminal prompt, including the 'flightgear' directory. Even so, I still get this same error message, although none of those subdirectories or files exist anymore.

Thanks for your help.
coderlen
 
Posts: 11
Joined: Mon Oct 15, 2018 2:20 am

Re: Trouble installing FlightGear on Ubuntu Linux

Postby saiarcot895 » Mon Oct 15, 2018 5:45 am

Removing files in system directories isn't a good idea, and it wouldn't have solved this issue.

What version of Ubuntu are you running? Are you using my PPA?

If all else fails, running "sudo apt remove flightgear flightgear-data-all" should remove everything.
Saikrishna Arcot

My FlightGear PPAs: FlightGear Stable, FlightGear Development (Edge)
saiarcot895
 
Posts: 343
Joined: Sat Feb 02, 2013 5:26 pm
Callsign: flyhigh
Version: -next PPA
OS: Ubuntu 20.04

Re: Trouble installing FlightGear on Ubuntu Linux

Postby coderlen » Mon Oct 15, 2018 6:25 am

saiarcot895, thanks for the prompt reply.

I'm running Ubuntu 18.04.

Curiously, I get the EXACT same error message when I try to install another app, Wine.

Unable to install Wine:
Error while installing package: trying to overwrite '/usr/share/games/flightgear/Aircraft/c172p/WebPanel/bootstrap/bootstrap.min.css', which is also in package flightgear-phi2016.4.2+dfsg1-1

I ran this command in a terminal window, as you suggested:
sudo apt remove flightgear flightgear-data-all

Then I tried installing Wine again, but I got the above error message, once again.

Perhaps that information will give you a hint as to the real problem.
coderlen
 
Posts: 11
Joined: Mon Oct 15, 2018 2:20 am

Re: Trouble installing FlightGear on Ubuntu Linux

Postby saiarcot895 » Mon Oct 15, 2018 6:27 am

Can you run "sudo apt remove flightgear-phi", and paste the full command output?
Saikrishna Arcot

My FlightGear PPAs: FlightGear Stable, FlightGear Development (Edge)
saiarcot895
 
Posts: 343
Joined: Sat Feb 02, 2013 5:26 pm
Callsign: flyhigh
Version: -next PPA
OS: Ubuntu 20.04

Re: Trouble installing FlightGear on Ubuntu Linux

Postby coderlen » Mon Oct 15, 2018 6:36 am

saiarcot895, here is the result:

/usr/share/games$ sudo apt remove flightgear-phi
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
flightgear-data-all : Depends: flightgear-data-base (>= 1:2018.2.2+dfsg-0ubuntu1~ppa11) but 1:2018.1.1+dfsg-1 is to be installed
Recommends: flightgear-phi (>= 1:2018.2.2+dfsg-0ubuntu1~ppa11) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
coderlen
 
Posts: 11
Joined: Mon Oct 15, 2018 2:20 am

Re: Trouble installing FlightGear on Ubuntu Linux

Postby Parnikkapore » Mon Oct 15, 2018 8:33 am

Oh. My. Gosh. That's a mess.

You might need to clean that off step by step:
Code: Select all
apt remove flightgear-data-base
apt remove flightgear-data-all
apt remove fightgear-phi


[advanced]That's quite a dependency hell he's gotten into. Probably ruined by Phi's packaging change.[/advanced]
There are free alternatives to (almost) every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 929
Joined: Thu Oct 29, 2015 11:16 am
Callsign: HS-FGS
Version: next
OS: Kubuntu

Re: Trouble installing FlightGear on Ubuntu Linux

Postby coderlen » Mon Oct 15, 2018 1:42 pm

Thanks, Parnikkapore. OK, I tried the three commands you suggested. Here are the results, one by one.

First command (apt remove flightgear-data-base)

Code: Select all
/usr/share/games$ apt remove flightgear-data-base
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
/usr/share/games$ sudo apt remove flightgear-data-base
[sudo] password for len:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 flightgear-data-all : Depends: flightgear-data-base (>= 1:2018.2.2+dfsg-0ubuntu1~ppa11) but it is not going to be installed
                       Recommends: flightgear-phi (>= 1:2018.2.2+dfsg-0ubuntu1~ppa11) but 2016.4.2+dfsg1-1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Second command (apt remove flightgear-data-all)

Code: Select all
/usr/share/games$ sudo apt remove flightgear-data-all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 flightgear : Depends: flightgear-data-all (>= 1:2018.2.2~) but it is not going to be installed
              Depends: flightgear-data-all (< 1:2018.2.3~) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Third command (apt remove flightgear-phi

Code: Select all
/usr/share/games$ sudo apt remove flightgear-phi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 flightgear-data-all : Depends: flightgear-data-base (>= 1:2018.2.2+dfsg-0ubuntu1~ppa11) but 1:2018.1.1+dfsg-1 is to be installed
                       Recommends: flightgear-phi (>= 1:2018.2.2+dfsg-0ubuntu1~ppa11) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
coderlen
 
Posts: 11
Joined: Mon Oct 15, 2018 2:20 am

Re: Trouble installing FlightGear on Ubuntu Linux

Postby ludomotico » Mon Oct 15, 2018 3:39 pm

Your system is in a broken state due to crossed dependencies and you won't be able to install or update anything without previously fixing it. This is the reason you can't install a completely unrelated application such as wine.

Fortunately, the system is also suggesting a possible fix:

Try 'apt --fix-broken install' with no packages


If you check the apt manual page:

Code: Select all
       -f, --fix-broken
           Fix; attempt to correct a system with broken dependencies in place. This option, when used
           with install/remove, can omit any packages to permit APT to deduce a likely solution. If
           packages are specified, these have to completely correct the problem. The option is sometimes
           necessary when running APT for the first time; APT itself does not allow broken package
           dependencies to exist on a system. It is possible that a system's dependency structure can be
           so corrupt as to require manual intervention (which usually means using dpkg --remove to
           eliminate some of the offending packages). Use of this option together with -m may produce an
           error in some situations. Configuration Item: APT::Get::Fix-Broken.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Trouble installing FlightGear on Ubuntu Linux

Postby coderlen » Mon Oct 15, 2018 6:43 pm

OK, I tried the apt --fix-broken install command. Here is the result:

Code: Select all
$ apt --fix-broken install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  flightgear-phi javascript-common libc-ares2 libhttp-parser2.7.1 libjs-bootstrap libjs-excanvas libjs-jquery libjs-jquery-flot
  libjs-jquery-ui libjs-jquery-ui-theme-smoothness libjs-leaflet libjs-requirejs libjs-requirejs-text liblua5.2-0 libopenscenegraph-3.4-131
  libqt5opengl5 libsimgearcore2018.2.1 libsimgearscene2018.2.1 libuv1 node-sprintf-js nodejs nodejs-doc
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  flightgear-data-base
The following packages will be upgraded:
  flightgear-data-base
1 upgraded, 0 newly installed, 0 to remove and 361 not upgraded.
241 not fully installed or removed.
Need to get 0 B/1,108 MB of archives.
After this operation, 54.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 262710 files and directories currently installed.)
Preparing to unpack .../flightgear-data-base_1%3a2018.2.2+dfsg-0ubuntu1~ppa11_all.deb ...
Unpacking flightgear-data-base (1:2018.2.2+dfsg-0ubuntu1~ppa11) over (1:2018.1.1+dfsg-1) ...
dpkg: error processing archive /var/cache/apt/archives/flightgear-data-base_1%3a2018.2.2+dfsg-0ubuntu1~ppa11_all.deb (--unpack):
 trying to overwrite '/usr/share/games/flightgear/Aircraft/c172p/WebPanel/bootstrap/bootstrap.min.css', which is also in package flightgear-phi 2016.4.2+dfsg1-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/flightgear-data-base_1%3a2018.2.2+dfsg-0ubuntu1~ppa11_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


There's still a problem.

And I did try installing FlightGear from Ubuntu Software. I got the exact same error:

Unable to install FlightGear:
Error while installing package: trying to overwrite '/usr/share/games/flightgear/Aircraft/c172p/WebPanel/bootstrap/bootstrap.min.css', which is also in package flightgear-phi2016.4.2+dfsg1-1

Wow, I must have really screwed things up. Thanks for your patience with me on this problem.
coderlen
 
Posts: 11
Joined: Mon Oct 15, 2018 2:20 am

Re: Trouble installing FlightGear on Ubuntu Linux

Postby ludomotico » Mon Oct 15, 2018 6:51 pm

You really must read the system messages :) They usually offer hints about what can be done next.

Use 'sudo apt autoremove' to remove them.


If this still fails, you can try to manually remove the offending packages as the manual page I copied before suggests. You shouldn't do this with system packages, but forcibly removing packages related to flightgear is OK in my opinion.

Code: Select all
sudo dpkg --remove flightgear-phi
sudo dpkg --remove flightgear-data-base


Finally, test the system is in good shape again:

Code: Select all
sudo apt --fix-broken install
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Trouble installing FlightGear on Ubuntu Linux

Postby coderlen » Mon Oct 15, 2018 7:56 pm

OK! I'm making progress.

I issued these commands at the terminal window, one at a time:

Code: Select all
sudo apt autoremove
sudo dpkg --remove flightgear-phi
sudo dpkg --remove flightgear-data-base
sudo dpkg --remove flightgear-all
sudo apt --fix-broken install


I issued the 'sudo dpkg --remove flightgear-all' at the suggestion of the system messages.

The 'sudo apt --fix-broken install' command launched the installation process, and it did complete successfully.

However, I got the following message box, with a Fatal exception:

Code: Select all
Fatal exception
Cannot open file AI/tankers.xml
at /usr/share/games/flightgear/defaults.xml,
line 875, column 6

received from /build/simgear-mm91nf/
simgear-2018.2.2/simgear/props/
props_io.cxx:281


This is really, really exciting! I think I am very, very close, thanks to your assistance.
coderlen
 
Posts: 11
Joined: Mon Oct 15, 2018 2:20 am

Re: Trouble installing FlightGear on Ubuntu Linux

Postby ludomotico » Mon Oct 15, 2018 11:07 pm

Mmmmm...

If I understood correctly, FlightGear and its data is installed but the simulator cannot start because it cannot find some unimportant file. This is weird, because AI/tankers.xml should be distributed with the base package but it is not really needed if you have not activated a scenario.

Is the launcher ("fgfs --gui") working? Did you activate a scenario in the launcher?

Can you check you have the file /usr/share/games/flightgear/AI/tankers.xml and you can read it? Do NOT run this with sudo, this file should be readable by a normal user. If you have to use sudo to read this file, it is a bug.

Code: Select all
cat  /usr/share/games/flightgear/AI/tankers.xml


If you don't have this file, it might be a weird side effect of the previous broken state. My suggestion is to purge everything related to FlightGear, clean the system including the apt cache, update, download and install again:

Code: Select all
sudo apt-get purge flightgear
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get update
sudo apt-get install flightgear


Breaking the package system shouldn't be a usual event. After getting FlightGear back, try to remember if you did anything in the last weeks to break the system: maybe you had a very out of date system? Did you configure a new PPA? Did you try to install very different versions of FlightGear at the same time? According to the system messages you provided, this last possibility seems plausible. New versions of the applications should overwrite previous versions, but if the two versions of the same application are too appart from each other or they are from different maintainers, maybe the new FlightGear didn't recognized the old one as an old "him".

I'm only guessing here, I don't know.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Trouble installing FlightGear on Ubuntu Linux

Postby coderlen » Mon Oct 15, 2018 11:37 pm

ludomotico, I launched it via fgfs in the terminal window, and it launched!

I am presuming that the only thing I need to do now is learn how to fly. I will be reading the manual thanks for your tip. This is going to be great!!!
coderlen
 
Posts: 11
Joined: Mon Oct 15, 2018 2:20 am

Re: Trouble installing FlightGear on Ubuntu Linux

Postby ludomotico » Tue Oct 16, 2018 4:14 pm

Great! Check the C172 tutorials as well.

Once you control the aircraft and its system and you are able to land without breaking the aircraft too much, check the cross country tutorial: viewtopic.php?t=19600
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest