Search code examples
memgraphdb

Error during installation of Memgraph on Debian 11 on AWS


I want to install Memgraph on Debian 11 that runs on AWS. I've followed the documentation from https://memgraph.com/docs/getting-started/install-memgraph/debian.

admin@ip-10-0-10-39:~$ sudo wget https://download.memgraph.com/memgraph/v2.13.0/debian-11/memgraph_2.13.0-1_amd64.deb
--2023-12-19 11:05:32--  https://download.memgraph.com/memgraph/v2.13.0/debian-11/memgraph_2.13.0-1_amd64.deb
Resolving download.memgraph.com (download.memgraph.com)... 172.67.130.22, 104.21.7.96, 2606:4700:3031::ac43:8216, ...
Connecting to download.memgraph.com (download.memgraph.com)|172.67.130.22|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25817440 (25M) [binary/octet-stream]
Saving to: ‘memgraph_2.13.0-1_amd64.deb’

memgraph_2.13.0-1_amd64.deb   100%[=================================================>]  24.62M  82.1MB/s    in 0.3s

2023-12-19 11:05:33 (82.1 MB/s) - ‘memgraph_2.13.0-1_amd64.deb’ saved [25817440/25817440]

admin@ip-10-0-10-39:~$ sudo dpkg -i memgraph_2.13.0-1_amd64.deb
Selecting previously unselected package memgraph.
(Reading database ... 28324 files and directories currently installed.)
Preparing to unpack memgraph_2.13.0-1_amd64.deb ...
Unpacking memgraph (2.13.0-1) ...
dpkg: dependency problems prevent configuration of memgraph:
 memgraph depends on libpython3.9 (>= 3.9.1); however:
  Package libpython3.9 is not installed.

dpkg: error processing package memgraph (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 memgraph

The documentation says that I should run

sudo apt-get install -f

but it does not help.

admin@ip-10-0-10-39:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  memgraph
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 70.4 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 28406 files and directories currently installed.)
Removing memgraph (2.13.0-1) ...
admin@ip-10-0-10-39:~$ sudo dpkg -i memgraph_2.13.0-1_amd64.deb
Selecting previously unselected package memgraph.
(Reading database ... 28330 files and directories currently installed.)
Preparing to unpack memgraph_2.13.0-1_amd64.deb ...
Unpacking memgraph (2.13.0-1) ...
dpkg: dependency problems prevent configuration of memgraph:
 memgraph depends on libpython3.9 (>= 3.9.1); however:
  Package libpython3.9 is not installed.

dpkg: error processing package memgraph (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 memgraph
admin@ip-10-0-10-39:~$

Solution

  • I guess that you presumed that sudo apt-get install -f will install missing packages. This is not true. That command doesn't update or install missing packages in the way that regular apt-get install commands do.

    It is used to fix broken dependencies of already installed packages.

    You have to install missing independencies first. Run sudo apt update and sudo apt install libpython3.9. The first command will update the package lists to make sure you have the latest information about available packages. The second one will install the missing libpython dependency.

    Next time when you run sudo dpkg -i memgraph_2.13.0-1_amd64.deb installation should proceed without the dependency error (or maybe some new dependency error will be shown; in that case repeat install procedure for that dependency). If there are still unresolved dependencies, sudo apt-get install -f would then be used to fix any broken dependencies left over from the installation process.