Ubuntu – Error : Cannot run C compiled programs. if you meant to cross compile use –host’ Ubuntu

ccompilinggccpermissions

I'm completely new to Ubuntu
I downloaded and unpacked a tar.gz package, after extraction, it is said in its documentation :
"type ./configure --disable-gts"

But when I run this command alone it tells me "Permission Denied" error.
Then I tried to use sh ./configure --disable-gts instead, but this time I faced this error:

> configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

How can I overcome these two problems? (I mean permission and compile error)
I'm just a rookie and I need urgent help.

Best Answer

The problem is almost certainly because you are trying to run the configure command on an external drive that does not support Unix-style executable permissions.

Although it is possible to mount some non-Linux drives with execute permissions, the easiest solution will be to copy the archive to somewhere in your actual Ubuntu home directory and try again there.

If you are trying to save disk space in your home directory you can keep the actual tar.gz file on the external disk.

Related Question