The GNU Compiler Collection (GCC) is an optimizing compiler produced by the GNU Project supporting various programming languages, hardware architectures and operating systems. The Free Software Foundation (FSF) distributes GCC as free software under the GNU General Public License (GNU GPL). GCC is a key component of the GNU toolchain and the standard compiler for most projects related to GNU and the Linux kernel. With roughly 15 million lines of code in 2019, GCC is one of the biggest free programs in existence. It has played an important role in the growth of free software, as both a tool and an example
Here I will give a few tips on how to fix gcc: error trying to exec ‘cc1’: execvp: No such file or directory
Contents
hide
Example of error
~/code/c/ut: gcc -std=c99 -Wall -Wextra -g -c object.c
gcc: error trying to exec 'cc1': execvp: No such file or directory
How to fix that?
find /usr/ -name "*cc1*"
# out: /usr/share/terminfo/x/xterm+pcc1
# out: /usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1
# out: /usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1plus
export PATH=$PATH:/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/
May be useful, Thank you