CentOS 8 Freesurfer RPM install
Exploring the broad range of yum command line options is beyond the scope of this freesurfer install example. Note that while a user without sudo/root privileges won't be able to install software with yum, you can always run yum (and rpm) commands without sudo and see what is installed on the system, what packages are available from the online repos, etc.
Update yum and rpm
Before installing the freesurfer CentOS7 RPM, freesurfer-CentOS7-7.0.0-1.x86_64.rpm, on CentOS8, please update both the installed yum and rpm programs with the following commands.
The commands to execute are:
$ sudo yum upgrade dnf $ sudo yum upgrade rpm
Answer "y" to the prompt to install the packages for the uprgades. The output from the start and end of these commands is picture below. The output on your system may vary depending upon what is already installed. If there is nothing to upgrade, then yum will report therre is "Nothing to do".
Start of output for upgrading the dnf command,
Answer "y" at the prompt. ... End of output for upgrading the dnf command,
Start of output for upgrading the rpm command,
Answer "y" at the prompt. ... End of output from upgrading the rpm command,
If the yum command has not been run in a while, the first thing it will do is update the list of packages available from the online repositories it searches for on the web to provide packages to download and install. You might see this kind of output reporting yum is updating the list of available packages from the web site repos,
- before the command returns showing freesurfer is not installed.
$ yum list installed | grep -i freesurfer <... output deleted ...> $
The result of the above command is nothing was printed out listing an installed freesurfer package and its version number. Or in the example below, the assumption is that no freesurfer package is currently installed on the system.
We provide a freesurfer *.rpm package for download that is currently not part of an existing Redhat, CentOS or third-party repository. Yum by default assumes a package is available from one of the online package repositories it has been configured to search. So in response to the most basic command to install a "freesurfer" package, yum will search through every repository it knows about, find nothing, and then give up.
$ sudo yum install freesurfer Last metadata expiration check: 0:12:59 ago on Thu 02 Apr 2020 08:33:41 PM EDT No match for argument freesurfer Error: Unable to find a match ... <your output will vary> $
The remedy is to provide command line options to tell yum: (1) the package is not signed as it would be in an online repository; (2) the freesurfer rpm package is local to the machine and should not be searched for in an online repository.
$ sudo yum --nogpgcheck localinstall freesurfer-CentOS7-7.0.0-1.x86_64.rpm
Previewing the install
The screen shots below show what the yum package manager reports needs to be installed on a specific CentOS 7.4 machine in order for freesurfer to run, i.e., in this case not too many additional packages are required. So depending upon what is already installed on your machine, you may see more or less packages need to be installed, e.g., you may already have the gcc tools installed on your system.
Typing "N" will cancel the install of all software.
Performing the install
Please note - if you already have freesurfer installed as /usr/local/freesurfer, e.g., then it is strongly advised you remove or rename the ./freesurfer directory to be something other than freesurfer under /usr/local. This is because the rpm installer will install freesurfer under the path with an explicit version identifier as the top level subdirectory /usr/local/freesurfer/<package version>
To perform the install answer "y" at the prompt.
The screen shots below show what the yum package manager reports has been installed on the system after the install has been done.
Verifying the install & Setup
Now yum should report a freesurfer package has been installed. Note that freesurfer was installed under /usr/local/freesurfer/7.0.0-1 matching the package revision yum lists installed on the system. Subsequent freesurfer rpm packages with higher revision numbers will be recognized by yum as upgrades to be installed on the system.
Setting the environment follows the standard procedure, exporting the path /usr/local/bin/freesurfer/7.0.0-1 for FREESURFER_HOME (here using bash or sh).
Finally, a simple test to see if the freeview application can load a volume.