Created
November 18, 2021 20:27
-
-
Save cmdrogogov/e89061d30be6a966d5c0d023f1b65bbd to your computer and use it in GitHub Desktop.
Revisions
-
cmdrogogov created this gist
Nov 18, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,69 @@ This is a hack and it goes without saying you really shouldn't be doing it, and we're horrible people for even trying. This will allow you to utilize the Centos8 repo to install MongoDB on the very unsupported Fedora >30 This is based off Mohamad Bana's excellent guide on how to install the AMDGPU ROCm stack on Fedora, which can be found here: https://bana.io/blog/fedora-34-rocm-install Commands: $ sudo dnf install kernel-headers-`uname -r` kernel-devel-`uname -r` $ sudo dnf install gcc rpm-build rpm-devel rpmlint make python bash coreutils diffutils patch rpmdevtools $ sudo dnf install python3.6 $ mkdir -pv ~/rpmbuild/SPECS/mongodb5.0.4-1 $ tee ~/rpmbuild/SPECS/mongodb5.0.4-1/mongodb-python-dummy.spec <<'EOF' Name: mongodb-python-dummy Version: 0.0.1 Release: 1%{?dist} Summary: Resolves MongoDB issues with `nothing provides /usr/libexec/platform-python needed by ...` errors License: MIT BuildArch: noarch URL: https://bana.io/blog/fedora-34-rocm-install BuildRequires: python3.6 BuildRequires: bash Requires: python3.6 Requires: bash Provides: /usr/libexec/platform-python Packager: YourNameHere %pre python --version ln -sv $(which python3.6) /usr/libexec/platform-python %post ls -lah /usr/libexec/platform-python || true %preun rm -v /usr/libexec/platform-python %postun ls -lah /usr/libexec/platform-python || true %description Resolves MongoDB issues with `nothing provides /usr/libexec/platform-python needed by ...` errors. See: * https://github.com/RadeonOpenCompute/ROCm/issues/567#issuecomment-771870262 * https://rigtorp.se/notes/rocm * https://rocmdocs.amd.com/en/latest * https://bana.io/blog/fedora-34-rocm-install/ %files %changelog EOF $ rpmbuild -bb ~/rpmbuild/SPECS/mongodb5.0.4-1/mongodb-python-dummy.spec $ sudo dnf install ~/rpmbuild/RPMS/noarch/mongodb-python-dummy-0.0.1-1.fc35.noarch.rpm Now you can go ahead and install MongoDB 4.4 or 5 from the Centos repos without running into the issue "nothing provides /usr/libexec/platform-python" I am not responsible for anything horrible that might happen to your system if you try this.