error trying to exec `as': execvp: No such file or directory

I have downloaded gfortran and gcc and they are safely tucked into /usr/local/bin!

However, gfortran test.f (where test.f is a Hello World write statement!) gives me the above error message.

Would some kind person suggest the next step!

g

Re: error trying to exec `as': execvp: No such file or directory

This error usually means that gcc isn't installed. However since you have it installed in /usr/local/bin you'll want to make sure /usr/local/bin is in your default PATH. This error means that 'as' which is the assembler can't be found.

In csh/tcsh:

setenv PATH ${PATH}:/usr/local/bin

In bash/sh:

export PATH=${PATH}:/usr/local/bin

Hope that helps,

Dave

Still struggling

-rwxr-xr-x 1 root wheel 554524 May 28 02:23 gcc
-rwxr-xr-x 1 root wheel 15886 May 28 02:22 gccbug
-rwxr-xr-x 1 root wheel 198964 May 28 02:22 gcov
-rwxr-xr-x 1 root admin 55556 Sep 23 2006 gettext
-rwxr-xr-x 1 root admin 4157 Sep 23 2006 gettext.sh
-rwxr-xr-x 1 root admin 39700 Sep 23 2006 gettextize
-rwxr-xr-x 1 root wheel 562772 May 28 02:22 gfortran

Thanks Dave,
I tried that in bash and then swapped to tcsh. No joy. So I then checked that gcc and gfortran had a bit of substance in /usr/bin --- which they do (as seen above). Is there somewhere that I should check to find the assembler?

g

Re: Still struggling

Hi,

I use the gcc that comes with Xcode, so it appears by default. In my case, it's located in /usr/bin:

[computer:apbs] admin% which as
/usr/bin/as

I'd check for 'as' in /usr/bin and /usr/local/bin . Alternatively you may want to install gcc from Xcode, unless you need a newer gcc.

Regards,

Dave

Alleluia

Ok. Success!

I had already downloaded Xcode --- but I hadn't clicked on XcodeTools.mpkg

but... Oh dear ... One final (?) question

My program has, as expected, produced an `a.out' file. Normally, I type a.out and the compiled version happily runs. Now I get "Command not found".

Sorry to pester.

g

PATH issues

Try entering './a.out' on the command line. Most set ups don't put the current directory on the $PATH variable.

gfortran: error trying to exec 'as': execvp: No such file or dir

I unfortunately have a similar problem getting the message gfortran: error trying to exec 'as': execvp: No such file or directory
.
I installed the binary files and the Xcode plugins, ran the suggsted additional path commands but this did not help either. I am a first time Mac user, so may do something stupid. Cannot locate the us/local either. However the compiler part generates the normal messages , e.g. one or two warnings, so it seems to work there, but apparently fails on the next steps.

Appreciate any help.

Han Dolman

Re: gfortran: error trying to exec 'as': execvp: No such file or

Hi Han,

This means you don't have the default compiler tools installed (or they aren't installed properly). Presumably you've installed the full blown Xcode IDE from Apple?

Puter:~ gohara$ which as
/usr/bin/as

Dave