我正在构建包ntpsec-1.1.3+dfsg1在巴斯特但编译时失败。错误是:
ModuleNotFoundError: No module named 'ntp.ntpc'
我看到有一些.py包中的文件需要ntp.ntpcmodule by grep 但我找不到安装该模块的位置。
build/main/pylib/packet.py:197:import ntp.ntpc
build/main/pylib/util.py:16:import ntp.ntpc
build/main/ntpclients/ntpq:27: import ntp.ntpc
build/main/ntpclients/ntpmon:38: import ntp.ntpc
pylib/packet.py:197:import ntp.ntpc
pylib/util.py:16:import ntp.ntpc
ntpclients/ntpq.py:27: import ntp.ntpc
ntpclients/ntpmon.py:38: import ntp.ntpc
如何解决这个问题?
答案1
2019 年 10 月 7 日
ntpsec、Debian Busterhttps://packages.debian.org/buster/ntpsec
ntpsec、Debian Sid https://packages.debian.org/sid/ntpsec
网络安全协议,构建示例 1 :# apt-get build-dep ntpsec
或/和# apt install build-essential asciidoc bison debhelper dh-apache2 dh-apparmor dh-python docbook-xsl libcap2-dev libssl-dev netbase pps-tools python3 python3-dev xsltproc python-all-dev python-gps
$ git clone https://github.com/ntpsec/ntpsec.git
$ cd ntpsec/
$ ./waf configure
$ ./waf build
.
tests that pass 7/7
'build' finished successfully (13.546s)
网络安全协议,构建示例 2 :添加席德/etc/apt/sources.list 行:示例 url →
deb-src http://ftp.dk.debian.org/debian/ sid main
....然后运行# apt update
构建 ntpsec packages.deb,版本“1.1.7+dfsg1-1”
$ mkdir ~./tmp
$ cd tmp/
$ mkdir ntpsec-1.17 && cd ntpsec-1.17/
$ apt-get -b source ntpsec=1.1.7+dfsg1-1
包构建结果:
ntpsec_1.1.7+dfsg1-1_amd64.deb
ntpsec-dbgsym_1.1.7+dfsg1-1_amd64.deb
ntpsec-doc_1.1.7+dfsg1-1_all.deb
ntpsec-ntpdate_1.1.7+dfsg1-1_amd64.deb
ntpsec-ntpviz_1.1.7+dfsg1-1_amd64.deb
python3-ntp_1.1.7+dfsg1-1_amd64.deb
python3-ntp-dbgsym_1.1.7+dfsg1-1_amd64.deb
Debian Buster 的 7 个软件包的链接https://drive.google.com/drive/folders/1y7KYc9SGq04g0a8AAXCGvmDHXasTJL5C?usp=sharing
10 月 8 日:构建软件包 ntpsec-1.1.3+dfsg1
可能是您能找到的错误最多的版本。因此 43 !补丁http://cdn-fastly.deb.debian.org/debian/pool/main/n/ntpsec/ntpsec_1.1.3+dfsg1-2.debian.tar.xz
tar xvf ntpsec_1.1.3+dfsg1.orig.tar.gz
cd ntpsec-1.1.3+dfsg1/
tar xvf ntpsec_1.1.3+dfsg1-2.debian.tar.xz
patch -p1 < debian/patches/[forty three times patch].patch
#### i.e. 43 times patch command ....
./waf configure
./waf build
'build' finished successfully (7.803s)
PS:原版ntpsec-1.1.3.tar.gz
https://ftp.ntpsec.org/pub/releases/ntpsec-1.1.3.tar.gz是完美的。 “1.1.3+dfsg1”的问题似乎是由 Debian 添加/好东西引起的。 1.1.7 版默认添加了以下新内容:https://github.com/ntpsec/ntpsec
PPS:'ntp.ntpc':ntpsec/build/main/ntpclients/ntp/ntpc.so