FoundationDB

Fresh Ubuntu 18.04 Server install requires running "apt --fix-broken install"


(Christophe Chevalier) #1

After a fresh install of ubuntu-18.04-live-server-amd64.iso, installing the 5.1.7 packages fails because python is not installed:

dpkg: dependency problems prevent configuration of foundationdb-server:
 foundationdb-server depends on python (>= 2.6); however:
  Package python is not installed.

Installing python now complains that there are unmet dependencies, and that I should run the command sudo apt --fix-broken install command. When I run that command, then it automatically install python27 then fdbserver.

The following packages have unmet dependencies:
 python : PreDepends: python-minimal (= 2.7.15~rc1-1) but it is not going to be installed
          Depends: python2.7 (>= 2.7.15~rc1-1~) but it is not going to be installed
          Depends: libpython-stdlib (= 2.7.15~rc1-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I’m not sure if having to literally type “fix broken install” as root on Ubuntu 18.4 is standard protocol or what, but I find this a bit weird… ???

Anyway, after that, fdb is running fine, but I was just wondering if 18.4 is different from previous LTS versions on that regard, and maybe the Getting starting on Linux page should be updated for 18.4?

Full install log below, run right after the installation completes.


First attempt at installing the packages

root@test-fdb-03:~/fdb#  dpkg -i foundationdb-clients_5.1.7-1_amd64.deb oundationdb-server_5.1.7-1_amd64.deb
Selecting previously unselected package foundationdb-clients.
(Reading database ... 102394 files and directories currently installed.)
Preparing to unpack foundationdb-clients_5.1.7-1_amd64.deb ...
Unpacking foundationdb-clients (5.1.7-1) ...
Selecting previously unselected package foundationdb-server.
Preparing to unpack foundationdb-server_5.1.7-1_amd64.deb ...
Unpacking foundationdb-server (5.1.7-1) ...
Setting up foundationdb-clients (5.1.7-1) ...
Adding group `foundationdb' (GID 113) ...
Done.
Adding system user `foundationdb' (UID 111) ...
Adding new user `foundationdb' (UID 111) with group `foundationdb' ...
Not creating home directory `/var/lib/foundationdb'.
dpkg: dependency problems prevent configuration of foundationdb-server:
 foundationdb-server depends on python (>= 2.6); however:
  Package python is not installed.

dpkg: error processing package foundationdb-server (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 foundationdb-server

Installing python manually:

root@test-fdb-03:~/fdb# apt install python
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:
 python : PreDepends: python-minimal (= 2.7.15~rc1-1) but it is not going to be installed
          Depends: python2.7 (>= 2.7.15~rc1-1~) but it is not going to be installed
          Depends: libpython-stdlib (= 2.7.15~rc1-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

"Fixing broken install" ???

root@test-fdb-03:~/fdb# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python2.7 python2.7-minimal
Suggested packages:
  python-doc python-tk python2.7-doc binutils binfmt-support
The following NEW packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python2.7 python2.7-minimal
0 upgraded, 7 newly installed, 0 to remove and 42 not upgraded.
1 not fully installed or removed.
Need to get 3,949 kB of archives.
After this operation, 16.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpython2.7-minimal amd64 2.7.15~rc1-1 [334 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 python2.7-minimal amd64 2.7.15~rc1-1 [1,292 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 python-minimal amd64 2.7.15~rc1-1 [28.1 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpython2.7-stdlib amd64 2.7.15~rc1-1 [1,910 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 python2.7 amd64 2.7.15~rc1-1 [238 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpython-stdlib amd64 2.7.15~rc1-1 [7,620 B]
Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 python amd64 2.7.15~rc1-1 [140 kB]
Fetched 3,949 kB in 0s (14.6 MB/s)
Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 102421 files and directories currently installed.)
Preparing to unpack .../0-libpython2.7-minimal_2.7.15~rc1-1_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.15~rc1-1) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../1-python2.7-minimal_2.7.15~rc1-1_amd64.deb ...
Unpacking python2.7-minimal (2.7.15~rc1-1) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../2-python-minimal_2.7.15~rc1-1_amd64.deb ...
Unpacking python-minimal (2.7.15~rc1-1) ...
Selecting previously unselected package libpython2.7-stdlib:amd64.
Preparing to unpack .../3-libpython2.7-stdlib_2.7.15~rc1-1_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.15~rc1-1) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../4-python2.7_2.7.15~rc1-1_amd64.deb ...
Unpacking python2.7 (2.7.15~rc1-1) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../5-libpython-stdlib_2.7.15~rc1-1_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.15~rc1-1) ...
Setting up libpython2.7-minimal:amd64 (2.7.15~rc1-1) ...
Setting up python2.7-minimal (2.7.15~rc1-1) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up python-minimal (2.7.15~rc1-1) ...
Selecting previously unselected package python.
(Reading database ... 103168 files and directories currently installed.)
Preparing to unpack .../python_2.7.15~rc1-1_amd64.deb ...
Unpacking python (2.7.15~rc1-1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up libpython2.7-stdlib:amd64 (2.7.15~rc1-1) ...
Setting up python2.7 (2.7.15~rc1-1) ...
Setting up libpython-stdlib:amd64 (2.7.15~rc1-1) ...
Setting up python (2.7.15~rc1-1) ...
Setting up foundationdb-server (5.1.7-1) ...
>>> configure new single memory
Database created
>>> status
Using cluster file `/etc/foundationdb/fdb.cluster'.

Unable to retrieve all status information.

Configuration:
  Redundancy mode        - single
  Storage engine         - memory
  Coordinators           - 1

Cluster:
  FoundationDB processes - 1
  Machines               - 0
  Fault Tolerance        - 0 machines
  Server time            - 06/09/18 12:37:36

Data:
  Replication health     - (Re)initializing automatic data distribution
  Moving data            - unknown (initializing)
  Sum of key-value sizes - unknown
  Disk space used        - unknown

Operating space:
  Unable to retrieve operating space status

Workload:
  Read rate              - unknown
  Write rate             - 0 Hz
  Transactions started   - 0 Hz
  Transactions committed - 0 Hz
  Conflict rate          - 0 Hz

Backup and DR:
  Running backups        - 0
  Running DRs            - 0

Client time: 06/09/18 12:37:36
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10) ...

Success!


(Jay Kominek) #2

I’m not sure if having to literally type “fix broken install” as root on Ubuntu 18.4 is standard protocol or what, but I find this a bit weird… ???

It just means “automatically figure out the best way of resolving all unsatisfied package dependencies” which would be a little long to type. :slight_smile:

This is exactly the series of commands I’d expect someone to have to run if they tried to manually install a .deb without one of its dependencies present. And Ubuntu 18.04 dropped Python 2.

The little bit of Python code in the server package should probably be updated to work on Python 3 as well, and then the package dependency tweaked to reflect that compatibility.


(Christophe Chevalier) #3

Maybe this is caused by the client package redistributing the python binding that may or may not be needed on server install? Could be nice to have a “server only” redist that can trim down on these dependencies.


(Jay Kominek) #4

The server package has /usr/lib/foundationdb/make_public.py in it (along with a copy of argparse). At first glance, it looks like it ought to be easy enough to make it support 2.6-3.x.