SUSE Linux ntp 升级报错(MAKE [1]:*** 【all】Error 2)

NTP升级,升级REDHAT时很顺利,升级完成后会默认覆盖掉原有文件,重启服务后,使用ntpd --version查看验证上即可,可在升级SUSE Linux时却发现错误频频,以下是我再升级时遇到的一些问题,小结之后希望有和我遇到同样错误的亲们可以作为参考:
一. 由于NTP包有漏洞,需下载4.2.7之后版本,网络下ntp-dev-4.2.7p26.tar.gz
1.解压
#  tar –zxf  ntp-dev-4.2.7p26.tar.gz –C /usr/src
2.编译
#  cd/usr/src/ntp-dev-4.2.7p26
#./configure --prefix=/usr/local/ntp-dev-4.2.7p26--enable-all-clocks --enable-parse-clocks
如果生成Makefile文件时报错,提示信息为usge –-host skip在./configure 参数后添加--host=x86_64,这个参数(x86_64)来源于uname –m后得出的结果

3. #make 如果make报错,信息如下
ntp_loopfilter.c: In function ‘local_clock’:
ntp_loopfilter.c:516: error: ‘MOD_NANO’ undeclared (first use in this function)
ntp_loopfilter.c:516: error: (Each undeclaredidentifier is reported only once
ntp_loopfilter.c:516: error: for each function itappears in.)
make[3]: *** [ntp_loopfilter.o] Error 1
make[3]: Leaving directory`/usr/src/ntp-dev-4.2.7p26/ntpd‘
make[2]: *** [all] Error 2
make[2]: Leaving directory`/usr/src/ntp-dev-4.2.7p26/ntpd‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/ntp-dev-4.2.7p26‘
make: *** [all] Error 2

解决方法如下:
vim include/ntp_syscall.h.patch

--- ntp-4.2.4p7/include/ntp_syscall.h
+++ ntp-4.2.4p7/include/ntp_syscall.h
@@ -14,5+14,13 @@
#include<sys/timex.h>
#endif
+#if defined(ADJ_NANO) && !defined(MOD_NANO)
+#define MOD_NANO ADJ_NANO
+#endif
+
+#if defined(ADJ_TAI) && !defined(MOD_TAI)
+#define MOD_TAI ADJ_TAI
+#endif
+
#ifndefNTP_SYSCALLS_LIBC
#ifdefNTP_SYSCALLS_STD

# cd include
# patch -p0 < ntp_syscall.h.patch
 patch file to:ntp_syscall.h
# cd ..
# make && make install
编译安装OK
4.生成环境变量
# echo ‘#ntp seting‘ >>  /etc/profile.local
# echo ‘export PATH=$PATH:/usr/local/ntp/bin‘>>  /etc/profile.local
#echo /usr/local/ntp/bin/ntpd -c /etc/ntp.conf -p/tmp/ntpd.pid >> /etc/profile.local
# source /etc/profile.local
5 验证
# ntpd –version
版本已升级为4.2.7p26

ps:

vim include/ntp_syscall.h.patch ,里的内容有的需要缩进,以#开关内容须缩进

时间: 2024-10-08 10:29:34

SUSE Linux ntp 升级报错(MAKE [1]:*** 【all】Error 2)的相关文章

Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令

分区的过程正常: [[email protected] /]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot      Start         End      Blocks   Id  System /dev/sda1   *

linux + eclipse + cdt 报错undefined reference......好麻烦的,这位大牛给出的方法可行,特此MARK!!!!

http://bbs.csdn.net/topics/390239632 kerosun kerosun 等级: 结帖率:96.92% 楼主 发表于: 2012-10-11 12:00:51 比如有一个tools工程,提供给其他工程通用的工具函数. 我现在的做法就只能是ctrl+c|ctrl+v一旦工具函数发生变化,还需要在用到这些函数的工程中更新,比较麻烦. 看到eclipse工程属性设置中有Project References,但是一直不会用.那位好心人能说说怎样实现我的需求. 更多0分享到

一看便知linux下mysql报错ERROR 1044: Access denied for user: &#39;@localhost&#39; to database &#39;mysql&#39;

错误信息:ERROR 1044: Access denied for user: '@localhost' to database 'mysql' linux下解决方案: mysql> use mysql ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql' mysql> exit Bye [[email protected] ~]# service mysqld stop如果该命令不

linux mysql启动报错Can&#39;t open and lock privilege tables: Table &#39;mysql.host&#39; doesn&#39;t exist

vi /etc/my.cnf  查看日志文件路径: log-error=/var/log/mysqld.log 查看报错日志: 之前的服务器被别人拿了,所以自己买了台美国vps,根据笔记安装完启动mysql,又启动不了. 查看了错误日志 引用 090321 18:55:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: Ta

将windows上面的项目拷贝到Linux环境下报错不能够找到对应的表com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table &#39;puyang.ServiceType&#39; doesn&#39;t exist

将一模一样的项目从win迁移到到linux上报错: 一开始还是以为是linux不能识别hql语句,查找资料发现是因为Liunx服务器上mysql是区分大小写的,而本地是不区分的如:代码是这样写的 @Entity@Table(name = "users") 数据库建的表名称是Users,那么就会出现以上异常. 将windows上面的项目拷贝到Linux环境下报错不能够找到对应的表com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExcepti

linux安装软件报错: Can&#39;t locate ExtUtils/Embed.pm in @INC...

安装snmp服务, 中间报错: Can't locate ExtUtils/Embed.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).BEGIN failed--compilation aborted. 到网上

oracle rac 安装 PRVG-13606 ntp 同步报错解决过程

oracle ntp 检查报错 ./runcluvfy.sh stage -pre crsinst -n oracle57,oracle58 -verbose [10:06:58]Verifying Network Time Protocol (NTP) ...FAILED[10:06:58]PRVG-1063 : configuration files for more than one time synchronization service[10:06:58]were found on n

python-pip升级报错- AttributeError: &#39;NoneType&#39; object has no attribute &#39;bytes&#39;

正常的pip升级命令: python -m pip install --upgrade pip 在pytharm里面创建了一个Python项目,pytharm会自动搭建一个新的Python环境,在当前的目录下使用 python -m pip install --upgrade pip 会报错 AttributeError: 'NoneType' object has no attribute 'bytes' 可以使用如下方式 easy_install -U pip python-pip升级报错-

pip升级报错 ImportError: cannot import name &#39;main&#39;

[email protected]:/usr/bin# pip3 install pyaudio Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main' 参考:https://stackoverflow.com/questions/28210269/impor