Trying to install CMSSW in an OS that is not officially supported (e.g. Mac OS, Arch Linux, etc) can be very difficult. It’s possible to run a virtual machine with Scientific Linux or CentOS as the guest OS instead. But there is also a more lightweight solution, which is to use a Docker container.

The official Docker images provided by ‘cmssw’ are huge (5-10 GB). Apparently there is a different Docker image that you can use, which is provided by ‘hepsw’, and is smaller (~200 MB). You can find the Dockerfiles used to build the images at (for ‘cmssw’) and at (for ‘hepsw’).

The following instructions should provide a functional CMSSW environment using the hepsw/cvmfs-cms image (tested on Linux Mint 18 as the host OS). Note that the image is based on slc-6.

# Install Docker from the repository
sudo apt install

# Load the Docker image
# '--privileged' option is required because of FUSE
sudo systemctl start docker
sudo docker run -h dev --privileged -i -t hepsw/cvmfs-cms

Once the image is loaded, you should be in the interactive session in the guest OS. To setup CMSSW:

yum install -y glibc glibc-headers glibc-devel.x86_64

export SCRAM_ARCH=slc6_amd64_gcc700
scramv1 project CMSSW CMSSW_10_4_0
cd CMSSW_10_4_0/src
eval `scramv1 runtime -sh`
scram b

To disable the annoying fastestmirror plugin for yum, open the file /etc/yum/pluginconf.d/fastestmirror.conf, and change enabled=1 to enabled=0.