Centos 7 安装 nginx安装,提示:c compiler cc is not found

nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的 源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux 3.10.0-957.el7.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C compiler cc is not found ... 阅读详情
AI摘要

本文介绍在VMware的Centos7系统中安装nginx-1.10.3的过程。安装时遇到缺少gcc - c++包的问题,通过执行yum - y install gcc - c++解决,可能因网络问题需多次尝试。安装环境检查无误后完成安装,最后启动nginx并验证安装成功。

在VMware 中安装Centos7后,准备安装nginx-1.10.3

将nginx-1.10.3.tar.gz,解压之后,进入nginx-1.10.3目录,准备安装,执行make && make install,

系统提示如下信息:

checking for OS
 + Linux 4.4.0-127-generic x86_64
checking for C compiler ... not found

./configure: error: C compiler cc is not found

查了下网上的资料,解决方案也不复杂。

原因是因为缺少 gcc-c++ 的包

解决办法很简单,执行:yum -y install gcc-c++

在执行上诉命令过程中,可能因为网络问题导致下载相关依赖包失败,可以尝试多试几次,我最后是通过链接手机wifi才下载安装成功的。

安装成功之后,执行命令:cd nginx-1.10.3 && ./configure --prefix=/usr/local/nginx 检查一下

出现这个说明,nginx安装环境没问题,准备开始安装nginx,执行make && make install

安装完成之后,启动nginx,命令:/usr/local/nginx/sbing/nginx 

输入:curl http://localhost 

nginx 安装成功!

“./configure: error: C compiler cc is not found” gcc和c++装完之后配置nginx的时候还会报cc找不到 错误:“./configure: error: C compiler cc is not found”  解决方法: CC=gcc export CC 设置这个环境变量,让gcc来代替cc! 阅读详情

相关推荐

从零开始安装pytorch(包含GPU和CPU版本的安装)

Pytorch是。

qiaoxinyu1989的博客 8万+

./configure: error: C compiler cc is not found

./configure: error: C compiler cc is not found

m0_64284147的博客 1万+

ad23新版Geber导出-官方教程(22.11版本后)

AD23新版本geber文件导出(含官方教程)-22.11之后的版本均可用此教程

安和的博客 3万+

/configure: error: C compiler cc is not found

(1)报错信息./configure: error: C compiler cc is not found(2)原因没有下载gcc编译器(3)解决办法用以下命令下载gcc编译器yum -y install gcc gcc-c++ autoconf automake make ...

weixin_31852627的博客 7348

劳特巴赫 Trace32 调试使用教程

详细介绍如何使用trace32进行调试

m0_56208280的博客 4万+

从零到一:QT for OpenHarmony 开发环境实战搭建与踩坑指南

本文是一份详尽的QT for OpenHarmony开发环境搭建实战指南。文章手把手教你如何在Windows和macOS系统上,从环境准备、核心工具(DevEco Studio与社区版QT SDK)安装配置,到创建首个QT Quick项目、解决构建部署中的常见问题,最终实现应用在OpenHarmony设备上运行。内容涵盖关键配置修改、资源管理及深度踩坑经验,旨在帮助开发者高效开启跨平台开发之旅。

weixin_29190573的博客 327

checking for C compiler ... not found

问题描述:CentOS7,Nginx安装,使用./configure 命令时,报checking for C compiler … not found ./configure: error: C compiler cc is not found错误,但是确定已经安装了gcc,PCRE,zlib,openssl。 解决方法:执行命令yum install glibc-devel ...

EstherLty的博客 1万+

保姆级教程:不用看古早代码,5分钟搞懂泛微ecology9附件存储与接口调用

本文详细解析了泛微ecology9附件存储与接口调用的核心原理,提供从基础概念到实战操作的完整指南。通过拆解文档化附件设计理念、解析RESTful接口参数,并给出Python代码示例,帮助开发者快速掌握附件上传与业务集成的关键技巧,提升二次开发效率。

weixin_28688385的博客 351

nginx安装错误:c compiler cc is not found

今天安装软件nginx的时候遇到的报错:c compiler cc is not foundnginx 查了下网上的资料,解决方案也不复杂。c++ 先说明下环境:服务器 服务器:CentOS 7 nginx:2.3.1 缘由是由于缺乏 gcc-c++ 的包机器学习 解决办法很简单,执行:yum -y install gcc-c++ 完美解决!! ...

weixin_53768277的博客 4399

拆解大疆Osmo Pocket:聊聊微型云台里那几根比头发丝还细的线,以及它为啥一开机就‘摇头晃脑’

本文深入拆解大疆Osmo Pocket微型云台的精密硬件结构,揭秘其开机自检时‘摇头晃脑’的奥秘。通过分析无刷电机、霍尔传感器和46AWG同轴线等核心组件,展现了大疆在微型云台设计中的工程智慧与创新技术,特别是FOC控制和陀螺仪的应用,实现了0.1°级的姿态控制精度。

weixin_27869497的博客 671

Cursor Agent模式下如何优雅切换conda环境运行Python脚本?3种实用方法实测

本文针对Cursor Agent模式下运行Python脚本时环境错配的痛点,实测了三种优雅切换conda环境的实用方法。通过Shell全局配置、项目级.cursorrc文件定制以及对话中直接指令,开发者可以确保AI助手在正确的虚拟环境中执行代码,从而提升开发效率和协作流畅度。

redis7keeper的博客 598

CentOS7.9安装nginx时,报错./configure: error: C compiler cc is not found

CentOS7.9安装nginx时,报错./configure: error: C compiler cc is not found CentOS7.9安装nginx时,执行./configure --prefix=/usr/local/nginx命令时,报错: checking for OS + Linux 3.10.0-1160.24.1.el7.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C com

weixin_40668374的博客 3198

【WiFi】T830 MT7992 WMM测试修改操作说明

WiFi WMM(Wi-Fi Multimedia)是Wi-Fi联盟推出的一项技术,用于优化无线网络中的多媒体内容传输。WMM通过优先处理不同类型的数据流来改善网络性能,特别是在网络拥堵时。:WMM通过提供服务质量支持,确保语音、视频和其他多媒体应用在无线网络中获得优先处理。这有助于减少延迟和抖动,改善用户体验。:WMM将数据流分为四个优先级队列:语音、视频、最佳效果(Best Effort)和背景(Background)。语音和视频流通常被赋予更高的优先级,以确保它们在网络中得到及时传输。

wgl307293845的博客 1022

./configure: error: C compiler cc is not found(转载)错误处理

./configure: error

fangfangtulk的专栏 2万+

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

centos7安装nginx 报./configure: error: C compiler cc is not found

CentOS 7 下 安装 nginx 执行配置命令。

rt133562的博客 914

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

checking for C compiler ... not found ./configure: error: C compiler cc is not found解决方案

问题描述:CentOS7,Nginx安装,使用./configure --prefix=/usr/nginx命令时,报checking for C compiler … not found ./configure: error: C compiler cc is not found错误,但是确定已经安装了gcc 解决方案: 在确定安装了gcc,PCRE,zlib,openssl之后,使用命令 yum install glibc-devel 结果:成功 ...

Hkdel98的博客 6323

CentOS 7 离线环境安装nginx时报错:./configure: error: C compiler cc is not found

先说解决方法: 在nginx目录下,查看objs/autoconf.err文件,该文件记录了具体的错误信息 vi objs/autoconf.err 一般就是缺少一些文件,因为我的gcc、g++也是离线包安装的,打开文件显示如下图 我这个就是没有找到libmpfr.so.4嘛,网上找了个mpfr的rpm包装上去就可以了。 具体情况具体处理,这里主要是说明可以在这个文件里看到具体的报错信息。 找到这个文件主要是想着是不是nginx代码有什么判断没走进去,就想看一下这个错是哪儿报的,然后使用...

1498
上一篇: CentOS7 yum update 更新失败
下一篇: 主机浏览器访问 VMware中Centos7 中运行的nginx
dw_java08
博客等级 码龄15年 122粉丝 66原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值