摘要: TypeError: 'NoneType' object is not callable None类型不是一个可以可以调用(callable)对象 赋值语句错误,值为None callable对象是指一个后面可以加()的对象,一般把调用函数时()去掉 函数例子 def use_logging(fun 阅读全文
posted @ 2020-11-24 17:23 hanjianfei 阅读(1375) 评论(0) 推荐(0) 编辑
摘要: docker中删除容器出现这个报错 解决方法:先查出其进程,kill掉,在进行删除 grep f5d0.......e0 /proc/*/mountinfo kill 4243 再次查看应该已经kill完 grep f5d0.......e0 /proc/*/mountinfo 然后docker r 阅读全文
posted @ 2020-11-23 17:55 hanjianfei 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 脚本范例 #!/bin/bash #this script is for check process NUM_VEN=`ps aux | grep ventilator.py | grep -v grep | wc -l` NUM_FTP=`ps aux | grep ftpsender.py | 阅读全文
posted @ 2020-11-18 16:08 hanjianfei 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 安装,启动ntp,并设置为开机自启动 yum -y install ntp systemctl start ntpd systemctl enable ntpd 配置计划任务,使用ntpdate同步时间 # 启动并开机启动计划任务cron systemctl start crond systemct 阅读全文
posted @ 2020-11-04 16:31 hanjianfei 阅读(576) 评论(0) 推荐(0) 编辑
摘要: 系统:CentOS Linux release 7.6.1810 (Core) docker版本:18.09.8 docker安装包下载:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.09 阅读全文
posted @ 2020-10-30 17:02 hanjianfei 阅读(697) 评论(0) 推荐(0) 编辑
摘要: 在虚拟机执行 ip addr,查找各种原因总是获取不到ip地址 有两种解决方案 1.cat /etc/sysconfig/network-scripts/ifcfg-ens33 ONBOOT=yes 2.为保险起见,开启和vmvare有关的服务 然后IP地址就可以正常看得到。 阅读全文
posted @ 2020-08-28 15:36 hanjianfei 阅读(1717) 评论(0) 推荐(0) 编辑
摘要: 在CentOS Linux release 7.6.1810的/usr/src/kernels安装内核文件 [root@localhost kernels]# uname -r3.10.0-957.el7.x86_64 http://66.155.76.156/redhat/7Server/x86_ 阅读全文
posted @ 2020-08-28 15:28 hanjianfei 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 在ubuntu安装nvidia显卡驱动报错 输入命令,按build-essential解决了 sudo apt-get install build-essential 阅读全文
posted @ 2020-07-04 19:18 hanjianfei 阅读(976) 评论(0) 推荐(0) 编辑
摘要: if循环小练习 age = 56 count = 0 while True: if count ==3: break guess_age = int(input("guess age:")) if guess_age == age: print("yes,you got it...") break 阅读全文
posted @ 2020-07-02 19:47 hanjianfei 阅读(168) 评论(0) 推荐(0) 编辑
摘要: import getpass username = input("username:")password = getpass.getpass("password:") print(username,password) 阅读全文
posted @ 2020-07-02 18:11 hanjianfei 阅读(763) 评论(0) 推荐(0) 编辑