I installed fpm on Ubuntu 24.04 using a snap package and set up the first_steps sample project. When I run “fortran-fpm run” I get an error which says that fpm cannot find the compiler gfortran. However gfortran is definitely in my PATH and is located at /bin/gfortran. The log file I get has the line
sh: 1: /bin/gfortran: not found
Is there an environment variable needing to be set? Note that fortran-fpm is the snap package command for fpm…
How familiar are you with snap? It intentionally runs the applications in a container with limited access to the host system. That is a very unusual way to install fpm. If you install it as a conventional application and/or build it from the single-source-file it will run in a normal shell with access to the base operating system applications which I assume is where you installed the compiler (?).
Yes that was the problem. snap runs in a container and restricts the environment making it cumbersome to run dev apps. I downloaded the binary and it works fine. Pity that fpm is not in the Debian/Ubuntu apt repo to avoid these complications or that the snap docs for fortran-fpm are not more helpful