You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在VDS服务器安装Git执行sudo make install时遇Missing seperator错误

Fixing the "missing separator" Makefile Error When Installing Git

Hey there, let's sort out this Makefile issue you're facing! That *** missing separator. Stop. error is a classic gotcha with Makefiles—they're super picky about syntax, and your current file isn't following the rules Make expects.

What's Wrong With Your Current Makefile?

Your Makefile has this line:

make configure ./configure --prefix=/usr/local

This isn't valid Makefile syntax for two big reasons:

  1. Makefiles require a clear target-dependency-command structure, not just a random string of commands.
  2. Any actual command in a Makefile must start with a Tab character (spaces won't work—this is the #1 cause of that separator error). Also, you've mashed two separate commands into one line, which isn't how Make works.

Solution 1: Fix Your Makefile

If you really want to use a Makefile for this process, here's the correct way to write it (pay close attention to the Tab indents!):

# Target to install Git
install:
	# First run the configure script with your desired prefix
	./configure --prefix=/usr/local
	# Compile the source code
	make
	# Install to the system path (requires sudo)
	sudo make install

⚠️ Critical note: Each line starting with ./configure, make, and sudo make install must start with a single Tab—not spaces. Make will throw that separator error if you use spaces here.

Solution 2: Skip the Makefile Entirely (Easier!)

Honestly, you don't even need a Makefile for this. You can just run the commands directly in your terminal, which is simpler and avoids syntax headaches:

# First, install required build dependencies (prevents compilation errors)
sudo apt update && sudo apt install build-essential libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev

# Run the configure script to set up installation options
./configure --prefix=/usr/local

# Compile the Git source code
make

# Install Git to your system
sudo make install

Quick Check After Installation

Once it's done, verify Git is installed correctly by running:

git --version

You should see the latest version number pop up!

内容的提问来源于stack exchange,提问作者G'ofur N

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:33:22