Tested with Fedora 39 through 41.
First we install some common development tools like gcc and make, Fedora provides a group of packages for that call Development Tools
sudo dnf groupinstall "Development Tools"
sudo dnf group install development-tools
sudo dnf install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel findutils tk-devel libyaml-devel gcc-g++ cmake scdoc
sudo dnf install gcc wget tar make zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel findutils tk-devel libyaml-devel gcc-g++