如何为 debian etch 编译 netcat-openbsd?

如何为 debian etch 编译 netcat-openbsd?

我试过:

apt-get install netcat-openbsd
apt-get source netcat-openbsd

它抱怨道:

E: Couldn't find package netcat-openbsd
E: Unable to find a source package for netcat-openbsd

然后,我尝试:

wget ftp://ftp.debian.org/debian/pool/main/n/netcat-openbsd/netcat-openbsd_1.105.orig.tar.gz
tar -xzf netcat-openbsd_1.105.orig.tar.gz
cd netcat-openbsd-1.105
make

它抱怨道:

Makefile:6: *** missing separator.  Stop.

我也在 Jessie 身上尝试了以下方法:

apt-get build-dep netcat-openbsd
apt-get source netcat-openbsd
tar -czf nc.tar.gz netcat-openbsd-1.105
cat nc.tar.gz | nc -l 80

然后在 Etch 上:

wget 192.168.1.101
tar -xzf index.html
cd netcat-openbsd-1.105
make

它抱怨道:

netcat.c:99:24: error: bsd/stdlib.h: No such file or directory
netcat.c:100:24: error: bsd/string.h: No such file or directory
make: *** [netcat.o] Error 1

你不说吗?让我来骗你:

cd /usr/include
mkdir bsd
for i in *; do ln -s ../$i bsd/$item; done
cd /root/netcat-openbsd-1.105
make

现在它说:

socks.c:41:32: error: bsd/readpassphrase.h: No such file or directory
socks.c: In function 'getproxypass':
socks.c:120: error: 'RPP_REQUIRE_TTY' undeclared (first use in this  function)
socks.c:120: error: (Each undeclared identifier is reported only once
socks.c:120: error: for each function it appears in.)
socks.c:120: warning: comparison between pointer and integer
make: *** [socks.o] Error 1

是的,我确实需要在 Etch 上使用它,而且我需要 BSD 的 -d 选项。我没什么主意了,任何建议都值得赞赏!

相关内容