Installing gcc on linux without c compiler

前端 未结 5 1689
轻奢々
轻奢々 2021-01-04 02:20

How can I install gcc on a system that have not any c compiler? this system is a linux base firewall and have not any c compiler.

5条回答
  •  走了就别回头了
    2021-01-04 02:59

    It depends on the distribution, if it's based on debian or some other of the big ones you can install gcc through apt-get or similar tool.

    If it's a more basic system you need to compile gcc yourself on another computer and copy it over. It will be easiest if you have another computer with the same architecture (i386, arm or x86_64 for example).

    I think that you might want to compile it statically also, so that you don't have dependencies on external libraries.

提交回复
热议问题