# Percona Mongo 4.0 on Ubuntu 22.04 LTS AMD64

**URL:** <https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240>\
**Category:** MongoDB\
**Tags:** percona, mongodb\
**Created:** [August 13, 2024, 1:33am UTC](https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240 "2024-08-13T01:33:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbiancot](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jbiancot/32/6030_2.png) [@jbiancot](https://forums.percona.com/u/jbiancot)\
**Post date:** [August 13, 2024, 1:33am UTC](https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240/1 "2024-08-13T01:33:47Z")

</div>

Hi there,

I have 3 bare metal servers running Ubuntu 20.04 LTS AMD64, finally I will upgrade very soon to Ubuntu 22.04 LTS - AMD64. The current version of Mongo running as ReplicaSet is v3.6. I’d like to upgrade to version 4.0 but I cannot find any apt repo that way I can do that?

I have another single Ubuntu 22.04 LTS AMD64 box, and I installed Percona MongoDB 4.4 but the databases are incompatibles.

Help me Obi-Wan Kenobi, you are my only hope.

---

<div class="post-metadata">

**Author:** ![Alex\_Miroshnychenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/alex_miroshnychenko/32/2621_2.png) [@Alex\_Miroshnychenko](https://forums.percona.com/u/Alex_Miroshnychenko)\
**Post date:** [August 13, 2024, 11:03am UTC](https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240/2 "2024-08-13T11:03:21Z")

</div>

Hi @jbiancot  
Percona Server for MongoDB 4.0 is EOL, but the packages for Ubuntu 20.04 are still available from our repo.

First you need to install our “percona-release” repository management tool as described here - [Install percona-release - Percona Software Repositories](https://docs.percona.com/percona-software-repositories/installing.html)

Once done, you can enable psmdb-40 repo using the following command:

```auto
percona-release enable psmdb-40 release

```

And install percona-server-mongodb (4.0.28-23.focal) as usual by running:

```auto
apt install percona-server-mongodb

```

> **percona-server-mongodb installation console output**
>
> ```auto
> root@8d6c8890965c:/# percona-release enable psmdb-40 release
> * Enabling the Percona Server for MongoDB 4.0 repository
> Hit:1 http://repo.percona.com/pmm2-client/apt focal InRelease
> Hit:2 http://repo.percona.com/prel/apt focal InRelease
> Get:3 http://repo.percona.com/psmdb-40/apt focal InRelease [15.7 kB]
> Hit:4 http://repo.percona.com/telemetry/apt focal InRelease
> Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
> Hit:6 http://archive.ubuntu.com/ubuntu focal InRelease
> Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease
> Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease
> Get:9 http://repo.percona.com/psmdb-40/apt focal/main Sources [2018 B]
> Get:10 http://repo.percona.com/psmdb-40/apt focal/main amd64 Packages [6238 B]
> Fetched 24.0 kB in 1s (22.6 kB/s)
> Reading package lists... Done
> root@8d6c8890965c:/# apt info percona-server-mongodb
> Package: percona-server-mongodb
> Version: 4.0.28-23.focal
> Priority: extra
> Section: database
> Maintainer: Percona Development Team <opensource-dev@percona.com>
> ...
> 
> ```
> 
> ```auto
> root@8d6c8890965c:/# apt install percona-server-mongodb
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following additional packages will be installed:
> libpcap0.8 libsasl2-modules-gssapi-mit percona-server-mongodb-mongos percona-server-mongodb-server percona-server-mongodb-shell percona-server-mongodb-tools
> The following NEW packages will be installed:
> libpcap0.8 libsasl2-modules-gssapi-mit percona-server-mongodb percona-server-mongodb-mongos percona-server-mongodb-server percona-server-mongodb-shell percona-server-mongodb-tools
> 0 upgraded, 7 newly installed, 0 to remove and 21 not upgraded.
> Need to get 66.4 MB of archives.
> After this operation, 269 MB of additional disk space will be used.
> Do you want to continue? [Y/n] y
> Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libpcap0.8 amd64 1.9.1-3 [128 kB]
> ...
> 
> ```
> 
> ```auto
> root@8d6c8890965c:/# mongod --version
> db version v4.0.28-23
> git version: 5780a7abf1ccd8874cf9a597ec2d914ecce10249
> OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
> allocator: tcmalloc
> modules: none
> build environment:
> distarch: x86_64
> target_arch: x86_64
> 
> ```

---

<div class="post-metadata">

**Author:** ![jbiancot](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jbiancot/32/6030_2.png) [@jbiancot](https://forums.percona.com/u/jbiancot)\
**Post date:** [August 18, 2024, 1:35pm UTC](https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240/3 "2024-08-18T13:35:12Z")

</div>

Thanks Alex but I have another issue, one of the servers I’ve upgraded to Ubuntu 22.04 LTS, I am getting a message the repo is not supported for the OS?

It must be a way to install Mongo 4.0 to Ubuntu 22.04?

My goal is to catch-up with version +5.0, but how I can skip the upgrade of 4.0 to 4.2 to 4.4 to 5.0?

The data was originally from Percoan Mongo 3.6 which I was able to upgrade to version 4.0 on another Production ENV servers, on this server which is a standalone with Ubuntu 22.04 LTS, the installation went for Percona Mongo 4.4 and when I tried to start the MongoDB service, it didn’t like the 200 GB of data I have.

```auto
[root@furious /tmp] curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 16510 100 16510 0 0 77947 0 --:--:-- --:--:-- --:--:-- 78246

[root@furious /tmp] apt install gnupg2 lsb-release ./percona-release_latest.generic_all.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'percona-release' instead of './percona-release_latest.generic_all.deb'
lsb-release is already the newest version (11.1.0ubuntu4).
gnupg2 is already the newest version (2.2.27-3ubuntu2.1).
percona-release is already the newest version (1.0-29.generic).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

[root@furious /tmp] apt update
Hit:1 http://download.virtualbox.org/virtualbox/debian jammy InRelease
Hit:2 http://es.archive.ubuntu.com/ubuntu jammy InRelease                                                   
Hit:3 http://es.archive.ubuntu.com/ubuntu jammy-updates InRelease                                           
Hit:4 http://es.archive.ubuntu.com/ubuntu jammy-backports InRelease        
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
...

[root@furious /tmp] percona-release enable psmdb-40 release
Specified repository is not supported for current operating system!

```

---

<div class="post-metadata">

**Author:** ![Mukesh\_Kumar](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mukesh_kumar/32/10698_2.png) [@Mukesh\_Kumar](https://forums.percona.com/u/Mukesh_Kumar)\
**Post date:** [August 19, 2024, 1:52am UTC](https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240/4 "2024-08-19T01:52:36Z")

</div>

Hi @jbiancot  
Regarding:

> [@jbiancot](#):
>
> My goal is to catch-up with version +5.0, but how I can skip the upgrade of 4.0 to 4.2 to 4.4 to 5.0?

To upgrade to v5.0, it’s always recommended to upgrade to each version of Mongo for data consistency/compatibility, i.e. 4.0 → 4.2 → 4.4 → 5.0.

However, we suggest going through our well written blog about upgrade [How to Upgrade MongoDB Using Backups Through Many Major Versions (percona.com)](https://www.percona.com/blog/how-to-upgrade-mongodb-using-backups-through-many-major-versions/) but again, you must successively upgrade to each major releases till v5.0.

Thanks,  
Mukesh

---

<div class="post-metadata">

**Author:** ![jbiancot](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jbiancot/32/6030_2.png) [@jbiancot](https://forums.percona.com/u/jbiancot)\
**Post date:** [August 19, 2024, 2:59pm UTC](https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240/5 "2024-08-19T14:59:22Z")

</div>

Hi,

My question remains, It must be a way to install Percona Mongo 4.0 to Ubuntu 22.04?

---

<div class="post-metadata">

**Author:** ![Alex\_Miroshnychenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/alex_miroshnychenko/32/2621_2.png) [@Alex\_Miroshnychenko](https://forums.percona.com/u/Alex_Miroshnychenko)\
**Post date:** [August 21, 2024, 7:45am UTC](https://forums.percona.com/t/percona-mongo-4-0-on-ubuntu-22-04-lts-amd64/32240/6 "2024-08-21T07:45:59Z")

</div>

HI @jbiancot  
The issue here is that the latest release of Percona Server for MongoDB 4.0 was released on February 23, 2022 - [Percona Server for MongoDB 4.0.28-23 — Percona Server for MongoDB 4.0 Documentation](https://docs.percona.com/percona-server-for-mongodb/4.0/release_notes/4.0.28-23.html) and Ubuntu 22.04(Jammy) was issued two months later in April 2022, so no packages were built for this version of Ubuntu.
