24

如何解决Linux下报错“make: *** No targets specified and no makefile found. Stop”

 2 years ago
source link: https://www.huhexian.com/15001.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

如何解决Linux下报错“make: *** No targets specified and no makefile found. Stop”

青山 2021-12-0410:21:47评论611字

今天在Linux安装包的时候,使用make命令出现报错:"make:*** No targets specified and no makefile found.Stop."。百度搜了一下,这个是因为客户的服务器在编译安装nginx的时候,并没有执行./configure 就直接make了,才导致这个报错,我们需要按顺序执行命令安装ncurses才可以解决报错原因,下面就来给大家分享解决方法。

如何解决Linux下报错“make: *** No targets specified and no makefile found. Stop”

一、Linux下各种依赖都已经安装,是因为没有找到makefile。
如果是自己写的,确定在当前目录下;如果是源码安装,先运行./configure,生成makefile,再执行make,即可正常运行。按顺序执行以下命令安装 ncurses:

  1. wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
  2. tar zxvf ncurses-5.6.tar.gz
  3. cd ncurses-5.6
  4. ./configure -prefix=/usr/local -with-shared -without-debug
  5. make install

二、如果没有安装其他依赖先安装依赖

  1. yum install gcc gcc-c++ autoconf automake
  2. yun -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel

(安装依赖zlib、openssl和pcre)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK