在Apache中找不到GCC

时间:2015-03-07 22:24:29

标签: linux gcc

我对所有服务器的东西都不是很好,在这里编码更好......

我想在基于Linux的Apache服务器上编译一些东西。

我做了很多阅读并感到困惑,所以我想验证我的理解。

要编译*.c我需要GCC,对吧?而且,还有其他选择吗?

当我在我的控制台登录时(不是root用户,没有),我输入gcc并返回“/ usr / sbin / apache:gcc:not found”,当我输入“哪个gcc“我什么都没得到。像perl这样的其他东西虽然有效。

我搜索了我的目录,并在/usr/中找到了很多gcc引用,所以我在这里列出了(对不起,它很长)。也许你可以告诉我该怎么做,或者看起来像什么。

哦,而且/usr/lib/gcc/4.6/中的ls命令没有显示任何内容!

 /usr/lib/gcc
 /usr/lib/i386-linux-gnu/gconv
 /usr/lib/pkgconfig
 /usr/lib/vmware-tools/lib32/libgcc_s.so.1
 /usr/lib/vmware-tools/lib32/libsigc-2.0.so.0
 /usr/lib/vmware-tools/lib64/libgcc_s.so.1
 /usr/lib/vmware-tools/lib64/libsigc-2.0.so.0
 /usr/lib/x86_64-linux-gnu/gconv
 /usr/share/doc/gcc-4.6-base
 /usr/share/doc/libgc1c2
 /usr/share/doc/libgcrypt11
 /usr/share/doc/libsigc++-2.0-0c2a
 /usr/share/pkgconfig
 /usr/src/linux-headers-3.2.0...ric/include/config/hangcheck
 /usr/src/linux-headers-3.2.0-23/kernel/gcov
 /usr/lib/git-core/git-gc
 /usr/lib/libgc.so.1
 /usr/lib/libgccpp.so.1
 /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0
 [/usr/share/doc/libgcc1...gcc-4.6-base
 /usr/share/misc/magic.mgc
 /usr/src/linux-headers-3.2.0...include/linux/compiler-gcc.h
 /usr/src/linux-headers-3.2.0...nclude/linux/compiler-gcc3.h
 /usr/src/linux-headers-3.2.0...nclude/linux/compiler-gcc4.h
 /usr/src/linux-headers-3.2.0-23-generic/include/linux/gcd.h
 [/usr/src/linux-headers-3.2.0-23-generic/kernel/gcov.....linux-headers-3.2.0-23/kernel/gcov
 /usr/src/linux-headers-3.2.0-23-generic/scripts/gcc-goto.sh
 /usr/src/linux-headers-3.2.0...neric/scripts/gcc-version.sh
 /usr/src/linux-headers-3.2.0...86_32-has-stack-protector.sh
 /usr/src/linux-headers-3.2.0...86_64-has-stack-protector.sh
 /usr/src/linux-headers-3.2.0...eric/scripts/kconfig/gconf.c
 /usr/src/linux-headers-3.2.0.../scripts/kconfig/gconf.glade
 /usr/bin/setlogcons
 /usr/lib/grub/i386-pc/gcry_arcfour.mod 
 /usr/lib/grub/i386-pc/gcry_blowfish.mod    
 /usr/lib/grub/i386-pc/gcry_camellia.mod    
 /usr/lib/grub/i386-pc/gcry_cast5.mod
 /usr/lib/grub/i386-pc/gcry_crc.mod 
 /usr/lib/grub/i386-pc/gcry_des.mod 
 /usr/lib/grub/i386-pc/gcry_md4.mod 
 /usr/lib/grub/i386-pc/gcry_md5.mod 
 /usr/lib/grub/i386-pc/gcry_rfc2268.mod 
 /usr/lib/grub/i386-pc/gcry_rijndael.mod    
 /usr/lib/grub/i386-pc/gcry_rmd160.mod  
 /usr/lib/grub/i386-pc/gcry_seed.mod    
 /usr/lib/grub/i386-pc/gcry_serpent.mod 
 /usr/lib/grub/i386-pc/gcry_sha1.mod    
 /usr/lib/grub/i386-pc/gcry_sha256.mod  
 /usr/lib/grub/i386-pc/gcry_sha512.mod  
 /usr/lib/grub/i386-pc/gcry_tiger.mod   
 /usr/lib/grub/i386-pc/gcry_twofish.mod 
 /usr/lib/grub/i386-pc/gcry_whirlpool.mod   
 /usr/lib/i386-linux-gnu/gconv/gconv-modules    
 /usr/lib/i386-linux-gnu/gconv/gconv-modules.cache  
 /usr/lib/libgc.so.1.0.3    
 /usr/lib/libgccpp.so.1.0.3 
 /usr/lib/perl/5.14.2/CORE/regcharclass.h   
 /usr/lib/perl/5.14.2/CORE/regcomp.h    
 /usr/lib/perl/5.14.2/bits/sigcontext.ph
 /usr/lib/python2.7/dist-pack...hardet/langcyrillicmodel.pyc
 /usr/lib/python2.7/dist-pack...twisted/internet/_sigchld.so
 /usr/lib/python2.7/dist-pack...ternet/test/test_sigchld.pyc
 /usr/lib/vmware-tools/lib32/libgcc_s.so.1/libgcc_s.so.1
 /usr/lib/vmware-tools/lib32/...gc-2.0.so.0/libsigc-2.0.so.0
 /usr/lib/vmware-tools/lib64/libgcc_s.so.1/libgcc_s.so.1    
 /usr/lib/vmware-tools/lib64/...gc-2.0.so.0/libsigc-2.0.so.0
 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules  55.05 KB    
 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache    
 /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0.0.0 18.05 KB
 /usr/share/apport/gcc_ice_hook 
 /usr/share/doc/git/contrib/examples/git-gc.sh
 /usr/share/doc/ttf-dejavu-core/langcover.txt.gz
 /usr/share/file/magic.mgc  
 /usr/share/git-core/contrib/hooks/pre-auto-gc-battery  
 /usr/share/language-selector/data/langcode2locale  
 /usr/share/lintian/overrides/libgcc1   
 /usr/share/locale-langpack/en_AU/LC_MESSAGES/gcc-4.6.mo    
 /usr/share/locale-langpack/en_GB/LC_MESSAGES/gcc-4.6.mo    
 /usr/share/man/man1/fgconsole.1.gz 
 /usr/share/man/man1/git-gc.1.gz    
 /usr/share/man/man8/setlogcons.8.gz    
 /usr/share/pyshared/chardet/langcyrillicmodel.py   
 /usr/share/pyshared/twisted/internet/_sigchld.c    
 /usr/share/pyshared/twisted/internet/test/test_sigchld.py  
 /usr/share/vim/vim73/compiler/gcc.vim
 /usr/share/vim/vim73/ftplugin/logcheck.vim 
 /usr/src/linux-headers-3.2.0.../include/config/crypto/gcm.h
 /usr/src/linux-headers-3.2.0...ude/config/x86/debugctlmsr.h
 /usr/src/linux-headers-3.2.0-23/arch/alpha/include/asm/gct.h   
 /usr/src/linux-headers-3.2.0...pha/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...arm/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...x900/include/mach/regs-gcr.h    
 /usr/src/linux-headers-3.2.0...r32/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...fin/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...ris/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...frv/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...300/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...gon/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...a64/include/asm/gcc_intrin.h    
 /usr/src/linux-headers-3.2.0...a64/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...32r/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...68k/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...aze/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0.../mips/include/asm/gcmpregs.h    
 /usr/src/linux-headers-3.2.0...ips/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...300/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...isc/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...isc/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...rpc/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...390/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...ore/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0.../sh/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0.../cpu-common/cpu/sigcontext.h    
 /usr/src/linux-headers-3.2.0...ude/cpu-sh4/cpu/sigcontext.h    
 /usr/src/linux-headers-3.2.0...arc/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...ile/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...e32/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...x86/include/asm/sigcontext.h    

 /usr/src/linux-headers-3.2.0...6/include/asm/sigcontext32.h    
 /usr/src/linux-headers-3.2.0...nsa/include/asm/sigcontext.h    
 /usr/src/linux-headers-3.2.0...nclude/acpi/platform/acgcc.h    
 /usr/src/linux-headers-3.2.0-23/include/linux/compiler-gcc.h   
 /usr/src/linux-headers-3.2.0...nclude/linux/compiler-gcc3.h    
 /usr/src/linux-headers-3.2.0...nclude/linux/compiler-gcc4.h    

 /usr/src/linux-headers-3.2.0-23/include/linux/gcd.h        
 /usr/src/linux-headers-3.2.0-23/scripts/gcc-goto.sh        
 /usr/src/linux-headers-3.2.0-23/scripts/gcc-version.sh     
 /usr/src/linux-headers-3.2.0...86_32-has-stack-protector.sh    
 /usr/src/linux-headers-3.2.0...86_64-has-stack-protector.sh    
 /usr/src/linux-headers-3.2.0-23/scripts/kconfig/gconf.c    
 /usr/src/linux-headers-3.2.0-23/scripts/kconfig/gconf.glade

1 个答案:

答案 0 :(得分:0)

C编译器可能被命名为ccwhich cc说什么? echo $PATH说什么? C编译器通常位于/bin/usr/bin/usr/local/bin中。如果它不在其中一个目录中,则不会安装它,您应该咨询您的包管理器进行安装。

/usr/lib下查找编译器可执行文件是徒劳的,因为这些文件不是直接从shell提示符运行的。 (编译器前端ccgcc知道如何调用/使用这些。)