I installed gcc using sudo yum install gcc
then I try compile c program it say gcc command not found
then I try to update the gcc using sudo yum update gcc
then it say Page(s) gcc available, but not installed
I try to find an answer in google, but I'm unable to fined the solution. please can anyone help me ?
我使用sudo yum install gcc安装gcc然后我尝试编译c程序它说gcc命令未找到然后我尝试使用sudo yum更新gcc更新gcc然后它说可用的页面(可用),但是没有安装我试着找到一个谷歌回答,但我无法对解决方案进行罚款。请有人帮帮我吗?
2 个解决方案
#1
1
These steps might help check what the cause could be.
这些步骤可能有助于检查原因可能是什么。
-
rpm -q gcc
--> check if gcc is installed and managed by yum/rpm - rpm -q gcc - >检查gcc是否由yum / rpm安装和管理
-
which gcc
--> check if gcc is in your search path for executables - 哪个gcc - >检查gcc是否在可执行文件的搜索路径中
-
gcc --version
--> check if gcc works in the simplest way (perhaps the error came from incorrect source file path passed to it) - gcc --version - >检查gcc是否以最简单的方式工作(可能错误来自传递给它的不正确的源文件路径)
#2
0
Finally I found the answer, first I did yum update audit
then I install gcc using yum install gcc
it works fine, thank you for your help
最后我找到了答案,首先我做了yum更新审核然后我用yum install gcc安装gcc它工作正常,谢谢你的帮助
#1
1
These steps might help check what the cause could be.
这些步骤可能有助于检查原因可能是什么。
-
rpm -q gcc
--> check if gcc is installed and managed by yum/rpm - rpm -q gcc - >检查gcc是否由yum / rpm安装和管理
-
which gcc
--> check if gcc is in your search path for executables - 哪个gcc - >检查gcc是否在可执行文件的搜索路径中
-
gcc --version
--> check if gcc works in the simplest way (perhaps the error came from incorrect source file path passed to it) - gcc --version - >检查gcc是否以最简单的方式工作(可能错误来自传递给它的不正确的源文件路径)
#2
0
Finally I found the answer, first I did yum update audit
then I install gcc using yum install gcc
it works fine, thank you for your help
最后我找到了答案,首先我做了yum更新审核然后我用yum install gcc安装gcc它工作正常,谢谢你的帮助