There are so many websites and YouTube videos that indicate and demonstrate that it is possible to install and use DOSBox on CentOS 7. I tried many different things which all seemed to roadblock at the prerequisite for libSDL_sound-1.0.so.1. Ranging from building from source that one specific prerequisite, where the build was apparently successful, the prerequisite still remained. A build of DOSBox was of no level of success for me. I decided to download and enable every repository I could find hoping that some combination of them would provided the necessary packages to allow for a successful install of DOSBox on CentOS 7 linux. That logic was not only sound, but it worked!
The CentOS instance is a minimal install with the following groupinstall.
yum groupinstall "Server with GUI" --exclude=libreoffice\* --exclude=unoconv\*
yum install -y https://schotty.com/yum/el/7/schotty-el7-release-7-1.noarch.rpm yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm yum install -y http://copr-be.cloud.fedoraproject.org/results/tomkep/epel-extras/epel-7-x86_64/epel-extras-7-1/epel-extras-7-1.noarch.rpm
yum install -y dosbox
While this will work, I wanted to save the RPMs for future reference to avoid having to go through all these motions in the future. To save the files to cache, change the keepcache value from 0 to 1 in /etc/yum.conf. Then run the command above to install dosbox.
[root@localhost dosbox]# cat /etc/yum.conf [main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=1
To demonstate clean the cache.
[root@localhost 7]#yum clean all [root@localhost 7]# pwd /var/cache/yum/x86_64/7 [root@localhost 7]# find . -type f -name "*.rpm"
Then install dosbox
yum install -y dosbox
Repeating the step above, check out the RPMs in the yum cache.
[root@localhost 7]# pwd /var/cache/yum/x86_64/7 [root@localhost 7]# find . -type f -name "*.rpm" ./epel/packages/libmikmod-3.2.0-21.el7.x86_64.rpm ./epel/packages/libmodplug-0.8.8.5-3.el7.x86_64.rpm ./schotty-el7/packages/SDL_sound-1.0.3-14.el7.centos.x86_64.rpm ./schotty-el7/packages/physfs-2.0.3-4.el7.centos.x86_64.rpm ./epel-extras/packages/SDL_net-1.2.8-6.el7.centos.x86_64.rpm ./epel-extras/packages/dosbox-0.74-13.el7.centos.x86_64.rpm ./epel-extras/packages/lzma-sdk457-4.57-8.el7.centos.x86_64.rpm
Take this a step farther, the rpms could be copied into a directory and tar'ed. Add a shell script into the mix.
#!/bin/bash yum install -y dosbox-0.74-13.el7.centos.x86_64.rpm \ libmikmod-3.2.0-21.el7.x86_64.rpm \ libmodplug-0.8.8.5-3.el7.x86_64.rpm \ lzma-sdk457-4.57-8.el7.centos.x86_64.rpm \ physfs-2.0.3-4.el7.centos.x86_64.rpm \ SDL_net-1.2.8-6.el7.centos.x86_64.rpm \ SDL_sound-1.0.3-14.el7.centos.x86_64.rpm
By using makeself, a self-extracting binary installer can be created. Basically, all the RPMs and the executable (chmod +x) installme.sh are in a directory. Navigate back one directory and run this command with makeself to generate a binary. Then make the binary an executable.
makeself.sh ./dosbox ./install-dosbox.bin "" ./install-dosbox.sh
To test the script, remove the dosbox install and it's dependencies. For overkill clean the yum cache again.
yum remove -y SDL_sound SDL_net libmikmod lzma-sdk457 physfs libmodplug dosbox yum clean all
Install dosbox with the newly created binary. Notice that the repositories have changed to reflect the source of the files as being local.
Once installed, type dosbox to run.
In fairness, this example is using MobaXterm Professional. So the behavior is expected. An attempt with Putty did not present the expected behavior.