alibaba / alibaba/LVS

编译 ipvsadm 时报错了:usr/bin/ld: cannot find -lnl

Open
#40 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2k
Forks
679
PR merge metrics
No merged PRs in 30d

Description

虚拟机、centos7 mini版,使用的是lvs v2,kernel和keepalived都编译安装成功了,但是编译 ipvsadm 时报错了

报错如下:
gcc -Wall -Wunused -Wstrict-prototypes -g -o ipvsadm ipvsadm.o config_stream.o dynamic_array.o ../keepalived/keepalived/libipvs-2.6/libipvs.a -lpopt -lnl
/usr/bin/ld: cannot find -lnl
collect2: error: ld returned 1 exit status
make: *** [ipvsadm] Error 1

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the ipvsadm link command shown in the report and reproduce it in the stated CentOS 7 environment. Trace which build configuration supplies -lnl and verify the required library is available to the linker. Done means ipvsadm builds successfully without the cannot find -lnl error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, centos, linux
Domain
build-system, cli, networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.