trouble compiling with gcc 5.1.1 in fedora-22
Hello, I have what I would call a dumb issue but it seems I won't figure it out by myself... So here I am.
I am trying to compile a basic "hello world!" code:
#include <stdio.h>
int main() {
printf("Hello World!\n");
return 0;
}
I compile with this command:
gcc -Wall hello.c -o test
and I am getting this error:
gcc: error trying to exec '/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/cc1': execv: Exec format error
I tried to remove and reinstall gcc several times using the dnf commands, but I am still getting the same results.
sudo dnf remove gcc
sudo dnf install gcc
I am running a fresh dual boot install of Fedora-22 and I made sure to use "sudo dnf update" before trying to compile anything.
Also, I tried:
file /usr/libexec/gcc/x86_64-redhat-linux/5.1.1/cc1
Which gives:
/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/cc1: empty
Hence, I believe there is something wrong with my gcc install.
Any ideas about what to try next? What am I not seeing here?