diff --git a/script/solve_gfortran b/script/solve_gfortran
index 30adc804e1690bcc9ffccd7fdc69c4f0a0804869..c3a0f539b903432725c97ce678e2ae48fc53c10c 100755
--- a/script/solve_gfortran
+++ b/script/solve_gfortran
@@ -14,7 +14,7 @@ if [ x"$1" = x"osx" ]; then
         commands[0]="$pcman install gcc"
         possible_solutions "${commands[@]}"
 elif [ x"$1" = x"linux"  ]; then
-        if [ x"$pcman" == "apt-get" ]; then
+        if [ x"$pcman" == x"apt-get" ]; then
           commands[0]="su -c \"$pcman install gfortran\""
           commands[1]="sudo $pcman install gfortran"
           possible_solutions "${commands[@]}"