# KeyError: 'leapp' in leapp preupgrade

**URL:** <https://forums.rockylinux.org/t/keyerror-leapp-in-leapp-preupgrade/15261>\
**Category:** Rocky Linux Help & Support\
**Tags:** unsupported, rocky-linux-8\
**Created:** [July 29, 2024, 10:11pm UTC](https://forums.rockylinux.org/t/keyerror-leapp-in-leapp-preupgrade/15261 "2024-07-29T22:11:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony98](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/tony98/32/4596_2.png) [@tony98](https://forums.rockylinux.org/u/tony98)\
**Post date:** [July 29, 2024, 10:11pm UTC](https://forums.rockylinux.org/t/keyerror-leapp-in-leapp-preupgrade/15261/1 "2024-07-29T22:11:41Z")

</div>

Hi All,

I am trying to upgrade from Rocky8 to Rocky9 using leapp  
sudo leapp preupgrade  
Traceback (most recent call last):  
File “/usr/local/bin/leapp”, line 11, in   
load\_entry\_point(‘leapp==0.14.0’, ‘console\_scripts’, ‘leapp’)()  
File “/usr/local/lib/python3.6/site-packages/leapp-0.14.0-py3.6.egg/leapp/cli/ **init**.py”, line 37, in main  
cli.command.execute(‘leapp version {}’.format(VERSION))  
File “/usr/local/lib/python3.6/site-packages/leapp-0.14.0-py3.6.egg/leapp/utils/clicmd.py”, line 105, in execute  
self.\_sub\_commands[cmdname].parser.error(leftover)  
KeyError: ‘leapp’

here is a kb article about this but I do not have access

> **[leapp preupgrade failed with a python traceback KeyError: 'leapp' - Red Hat...](https://access.redhat.com/solutions/6896571)**
>
> leapp preupgrade failed with the following error. # leapp preupgrade Traceback (most recent call last): File "/usr/bin/leapp", line 9, in load\_entry\_point('leapp==0.13.0', 'console\_scripts', 'leapp')() File...

can anyone help with this? thank you!

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [July 30, 2024, 6:10am UTC](https://forums.rockylinux.org/t/keyerror-leapp-in-leapp-preupgrade/15261/2 "2024-07-30T06:10:04Z")

</div>

Rocky does not support in-place conversion to different distro. (8 and 9 are two distros.)

You have to ask from where-ever youdid get the leapp from.

---

<div class="post-metadata">

**Author:** ![furieux](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@furieux](https://forums.rockylinux.org/u/furieux)\
**Post date:** [July 30, 2024, 7:40am UTC](https://forums.rockylinux.org/t/keyerror-leapp-in-leapp-preupgrade/15261/3 "2024-07-30T07:40:44Z")

</div>

Here is the output from the RHEL KB article:

## Resolution

- Execute the following command to check whether you have the `leapp-upgrade-el7toel8` & `leapp-upgrade-el7toel8-deps` packages installed on the RHEL 7.9 system.
- Execute the following command to check whether you have the `leapp-upgrade-el8toel9` & `leapp-upgrade-el8toel9-deps` packages installed on the RHEL 8.8 system.
- If not, execute the following command to install the `leapp-upgrade-elXtoelX` & `leapp-upgrade-elXtoelX-deps` packages. Depending on your RHEL version, replace ‘X’ with your package version.

[Raw](https://access.redhat.com/solutions/6896571#)

```auto
# yum install leapp-upgrade-elXtoelX leapp-upgrade-elXtoelX-deps

```

- For offline systems, Download packages and their dependencies from the Red Hat customer portal : [Red Hat Customer Portal](https://access.redhat.com/downloads/content/package-browser)

## Root Cause

- **The packages required for leapp installation are provided by extra repos ( rhel-7-server-extras-rpms ) on the RHEL 7.9 system.**
- **The packages required for leapp installation are provided by appstream repos ( rhel-8-for-x86\_64-appstream-rpms) on the RHEL 8.8 system.**
- The error happens when packages are manually installed on a system and some packages are missing.

---

<div class="post-metadata">

**Author:** ![tony98](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/tony98/32/4596_2.png) [@tony98](https://forums.rockylinux.org/u/tony98)\
**Post date:** [July 30, 2024, 3:37pm UTC](https://forums.rockylinux.org/t/keyerror-leapp-in-leapp-preupgrade/15261/4 "2024-07-30T15:37:21Z")

</div>

thank you so much! the error is gone after:  
yum install leapp-upgrade-el8toel9 leapp-upgrade-el8toel9-deps --allowerasing --skip-broken --nobest

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [September 28, 2024, 3:37pm UTC](https://forums.rockylinux.org/t/keyerror-leapp-in-leapp-preupgrade/15261/5 "2024-09-28T15:37:49Z")

</div>

Closed on September 28, 2024, 3:37pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
