[HOW-TO ] retrOSMCmk2: a RetroPie installer on the Vero4K

Thank you for this.

I just updated my vero 4k (non +) to the latest OSMC release and the retromsc launcher stopped working. Following the reinstall instructions to stop the service didn’t fix the permissions issue but fs.protected_fifos = 0 did.

I managed to run the installation, but it failed saying that the following packages could not be installed

libavdevice-dev, python3-urwid, python3-sdl2

Trying to install manually gave the following error;

The following packages have unmet dependencies:
 libsdl2-dev : Depends: libsdl2-2.0-0 (= 2.0.10+5mali) but 2.0.14+dfsg2-3+deb11u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I manually uninstalled these packages

libsdl2-2.0.0 libsdl2-dev

Then reran the install, which managed to complete this time with only one error

libavdevice-dev could not be installed

I tried sudo apt --fix-broken install but didn’t try getting further due to lack of time.

Correcting dependencies... failed.
The following packages have unmet dependencies:
 libfluidsynth2 : Depends: libsdl2-2.0-0 (>= 2.0.12) but 2.0.10+5mali is installed
 libsdl2-gfx-1.0-0 : Depends: libsdl2-2.0-0 (>= 2.0.12+dfsg1) but 2.0.10+5mali is installed
 libsdl2-mixer-2.0-0 : Depends: libsdl2-2.0-0 (>= 2.0.12) but 2.0.10+5mali is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Perhaps @hissingshark might glean some insight from this.

And for reference;

Linux osmc 4.9.269-16-osmc #1 SMP PREEMPT Tue Nov 1 15:44:25 UTC 2022 aarch64 GNU/Linux

Unfortunately I have run into more problems further down the line.

Whilst running the installation, I am getting the following message and RetroArch is not installing.

Did not find needed dependencies: libxkbcommon-dev libusb-1.0-0-dev
libavcodec-dev libavformat-dev libavdevice-dev.

I have spent a lot of time trying possible fixes from the forums and I’ve searched this thread through top to bottom to find any clue, but to no avail.

So unfortunately I’m stuck. I have no idea why the above packages won’t load.

As mentioned above, fresh installation on a vero 4k+

I would be very grateful for any help.

OK - in the absence of further input I had a go myself and after spending a few nights on it I think I have found a solution.

I have to disclose that I’m no expert and hardly certain of what exactly I’m doing, just merely piecing together actions from various posts that I have found useful.

First I had to disable SDL2, to do this I had to create a new config file (as it was not already there):

cd /opt/retropie/configs/all && >retropie.cfg

Then I have inserted the following line into the new config file:


after which I ran the following command:

sudo apt remove libsdl2-dev

[from this post: Ubuntu 19.04 issues - RetroPie Forum ]

Then I have inserted the below line into


core_updater_buildbot_url = “index - powered by h5ai v0.29.0 (https://larsjung.de/h5ai/)

[as per point 6 from this post: Retroarch Not Working? Here's a Bunch of Fixes - Make Tech Easier]

After running the above I was able to install the RetroArch packages that were missing from my system.

I am posting this since it may be useful to others but would also be grateful if anyone wishes to comment.



At the next regular update of OSMC I had the below message and the update failed.

The following packages have unmet dependencies:
libavdevice58 : Depends: libsdl2-2.0-0 (>= 2.0.12) but 2.0.10+5mali is installed

My workaround for this problem is

sudo apt-get remove --auto-remove libavdevice-dev libavdevice58

sudo apt-get dist-upgrade

Then reboot and OSMC is back to normal it seems.

I did a quick check of the functionality of RetroPie and it seems to work.

I know it’s a bit late but here’s a fix for the libsdl2-dev dependency which in turn fixes the python3-urwid, python3-sdl2 installation issue: apparently libsdl2-dev is to be installed from the upstream repo instead of using the custom package created when building SDL2. To fix the issue you just need to install the custom package built previously (the concrete version might of course change in later releases):

sudo dpkg -i ~/retrOSMCmk2/submodule/RetroPie-Setup/tmp/archives/bullseye/vero4k/libsdl2-dev_2.0.10+5mali_armhf.deb

After this you can rerun that installation (I think core’s joy2key is the one depending on this) and it should work.

Now I still need to find a fix for the libavdevice-dev issue in order to install retroarch. Next up…


It was python3-sdl2 that was my showstopper.
I upgraded my SDL2 builds to 2.0.20 a while back to circumvent that.
Now we are on Bullseye RetroPie are expecting 2.0.26, but it’s not working on our platform so I found a compromise.

I expected you’d get an update notification from my installer, but I think I’ve missing a change to push it. I’m out of practice. Let me check.

I also updated all of the binaries for Bullseye, so I’m not sure why you can’t just install Retroarch that way.
You’re finding it’s missing a dependency?

Hi hissingshark. Have a look at myol’s post above. It comes down to two things:

  1. You still patch for 2.0.10 but Debian now requires at at least 2.0.12.
  2. I had an existing retrOSMCmk2 checkout and it seems that simply pulling your latest changes isn’t enough because the RetroPie-Setup submodule wasn’t updated alongside it. Let me try doing that as that will use 2.26.3, fulfilling the >= 2.0.12 upstream dependency.

Success :beers:

I simply removed my earlier retrOSMCmk2 checkout, cloned it again and added the following patch to be on the safe side:

diff --git a/setup.sh b/setup.sh
index 34d5e7b..b355358 100755
--- a/setup.sh
+++ b/setup.sh
@@ -258,8 +258,8 @@ function patchRetroPie() {

   # PATCH R23V3
   # hold SDL2 version for our downloads
-  sed -i '/local ver="$(get_ver_sdl2)+/s/+.*"/+5"/' submodule/RetroPie-Setup/scriptmodules/supplementary/sdl2.sh
-  sed -i '/function get_ver_sdl2() {/,/}/s/".*"/"2.0.10"/' submodule/RetroPie-Setup/scriptmodules/supplementary/sdl2.sh
+  #sed -i '/local ver="$(get_ver_sdl2)+/s/+.*"/+5"/' submodule/RetroPie-Setup/scriptmodules/supplementary/sdl2.sh
+  #sed -i '/function get_ver_sdl2() {/,/}/s/".*"/"2.0.10"/' submodule/RetroPie-Setup/scriptmodules/supplementary/sdl2.sh

   # No more patches affecting RPi
   [[ "$platform" == rpi* ]] && return 0

I then ran RetroPie-Setup (via setup.sh) and removed everything for a fresh start. Then I installed all core packages and this time it just worked flawlessly, on my Vero 4k with the latest OSMC (19.5, May update). I haven’t launched anything for real test drive but the installation issues should resolved.


I’ve already fixed it, but thank you for having a look. The update notification should come through in due course, but you can also manually check for updates in the addon settings.

Oddly I’m getting some crashes with the add-on when checking for updates now.
I’ve spotted a few Kodi v19 changes that needed fixing. But the crash is not resolved.
A re-clone is easiest for now it seems.

Upon my actual test drive I noticed that RetroArch has a (informal) dependency on libmbedtls12 which wasn’t satisfied on my system, so I had to install it manually. Without it RetroArch (and thus all its emulators) wouldn’t run at all. After fixing that RetroPie worked like a charm (again) :partying_face:

Hope this helps!

I see what you mean. My binaries are built with that package, but it’s not part of the dependancies listed by Retropie-Setup. I do a lot of other building on my box, so I must have already installed it for something else. I will fix upstream.

What I have noticed in up-to-date versions is that some cores seem to report they don’t support savestates e.g. PSX and Dreamcast. They used to.
Don’t know if they’ve broken something in the cores or Retroarch itself.

1 Like

Hm, I use the (main) lr-psx-rearmed core but haven’t noticed any issue so far. I’ll keep looking and report back if I encounter anything.

Cheers - and thanks once again for your efforts!

1 Like

So does this = fresh install and reinstall via guide will work now?

Many thanx in advance

I think so.
From the above you are on Vero4k and your problems seem to have been due to the upgrade to Bullseye (RetroPie wanted a different SDL2 version then the one I was supplying).

I’ve picked up on a few Python and Kodi API bugs due to their respective upgrades too. I’m nearly done ironing those out. So maybe reclone in a few days.
I’ll post when it’s done.

1 Like

Outstanding :+1:. yeah vero 4k cheers again this on l8st osmc update? Still on March here or won’t it matter 🫰🏻

It shouldn’t matter. The changes came prior.
I’ve updated the repo now so it should be working.

1 Like

Just spent a couple hours trying to figure this out. I can’t get any game to launch. According to the runcommand.log I’m missing a library

Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-snes9x2010/snes9x2010_libretro.so --config /opt/retropie/configs/snes/retroarch.cfg "/home/osmc/RetroPie/roms/snes/Super Mario All-Stars (U) [!].smc" --appendconfig /dev/shm/retroarch.cfg
/opt/retropie/emulators/retroarch/bin/retroarch: error while loading shared libraries: libmbedtls.so.12: cannot open shared object file: No such file or directory

Where would I find libmbedtls.so.12 and where should it go?

It needs fixing upstream. I meant to do a patch for it.
Just install it with:
sudo apt-get install libmbedtls12

1 Like