记录bug
- SecureCRT首次安装启动事报错
/usr/bin/SecureCRT: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
缺少libpng12.so.0文件
查看下系统是否有这个文件,如果有就拷贝
export LD_LIBRARY_PATH=/usr/lib/:$LD_LIBRARY_PATH
# 因为查到libpng12.so.0系统中有这个文件,创建软链接就ok
sudo ln -s /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0 /usr/lib/libpng12.so.0
2.在虚拟环境中安装python包
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config': 'curl-config'
# 解决方法
sudo apt-get install libcurl4-openssl-dev
Command "python setup.py egg_info" failed with error code -11 in /tmp/pip-install-u55oidwl/fake-useragent/
# 解决方法
easy_install -U setuptools
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for pycurl
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
查看僵尸进程
ps -A -ostat,ppid,pid,cmd | grep -e '^[Zz]'
ps -ef | grep defunct | grep -v grep | wc -l
python3 下使用Flask,数据库迁移错误
报错如下:
ModuleNotFoundError: No module named 'MySQLdb'
安装MySQLdb报错,因为目前MySQLdb不支持python3,这个包名变了
ModuleNotFoundError: No module named 'ConfigParser'
解决方法:使用pymysql代替
pip install pymysql
在项目app中的__init__文件中导入:
import pymysql
pymysql.install_as_MySQLdb()