各种小问题
运行程序找不到动态库:error while loading shared libraries: xxx.so: cannot open shared object file: …
ldd命令可以查看程序运行所要依赖的动态库。
默认程序运行的时候动态库查找路径包括/lib(64), /usr/lib和/etc/ld.so.conf.d/目录下的所有路径。
例如:/usr/local/lib这个默认是没有的。
可以/etc/ld.so.conf.d/目录下在添加动态库路径文件。
sudo ldconfig
使生效
service network restart之后没有eth0
配置文件:/etc/sysconfig/network-scripts/ifcfg-eth0
设为ONBOOT=yes
service network restart
使用Powershell时,rm删除目录提示 “Remove-Item : 无法删除目录…”
rmdir /s/q dirname
# service network restart时出现错误:
Shutting down interface …: Error: … disconnecting failed: This device is not active
停用NetworkManager后再重新启动服务即可解决问题(restart network service)
[root@proxy network-scripts]# service NetworkManager stop
[root@proxy network-scripts]# chkconfig NetworkManager off
[root@proxy network-scripts]# chkconfig network on
[root@proxy network-scripts]# service network restart
python使用XML解析器的时候
ImportError: No module named etree.ElementTree
自己编写的文件名不能为xml.py。