command 'gcc' failed with exit status 1错误问题的解决办法
错误提示#include "Python.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1include "Python.h"看到是缺失"Python.h",所以就安装以下python的devel环境python2执行以下命令yum install python-
错误提示#include "Python.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1include "Python.h"看到是缺失"Python.h",所以就安装以下python的devel环境python2执行以下命令yum install python-
php判断微信uafunction is_weixin(){ if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false ) { return true; } return false; }然后if (is_weixin()){ #执行代码 }或者也可以直
// 去掉分类url中的category if(!function_exists('no_category_base_refresh_rules') ){ register_activation_hook(__FILE__, 'no_category_base_refresh_rules'); add_action('created_category', 'no_category
// 添加斜杠 分类页面添加"/"斜杠 function nice_trailingslashit($string, $type_of_url) { if ( $type_of_url != 'single' && $type_of_url != 'page' && $type_of_url != 'single_paged' )
以下代码加入functions.php里// 头部冗余代码 remove_action( 'wp_head', 'wp_generator' );//移除WordPress版本 remove_action( 'wp_head', 'rsd_link' );//移除离线编辑器开放接口 remove_action( 'wp_head', 'wlwmanifest_link' );//移除离线编辑器开放
第一步,打开wp-config.php,添加define('SAVEQUERIES', true);开启SAVEQUERIES会使WordPress将当前页面执行的sql查询保存到一个数组中,数组保存了每条查询的语句、调用该查询的函数以及执行时间。只要打印这个数组就能了解当前页面所有的sql查询了,所以…第二步,打印数组,将下面的代码放到footer.php </body>前面<
MySQLdb._exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")宝塔的mysql.sock文件在/tmp/目录下,所以建立一个软链接就行了。直接建立软链接会提示找不到目录,所以先创建一个目录mkdir /
vps 开机显示kernel offset,找回数据的方法(事先尝试过网上的解决方案,但是都失败了)。思路:找回数据,然后重装vps。重要的就是找回数据,重装vps就不用多说了。方法是本地用vmware建立一个centos虚拟机,把快照作为虚拟磁盘添加到这个虚拟机上,打开虚拟机就能看到数据了。具体步骤:首先给vps建立快照,然后下载到本地,每个主机商的后台应该都有。快照下载下来后是.qcow2格式
1、如果有旧版本Python3,请尽可能的卸载干净。yum remove -y python3 && \ whereis python3 |xargs rm -frv && \ rm -rf /usr/bin/python3 && \ rm -rf /usr/bin/pip32、yum update -yyum update -y3、安装依赖暂时还没
可能原因是缺少相应的模块和python3-dev的依赖库。yum update -y yum install -y python3-dev easy_install Flask-Session pip install gevent-websocket #相应python版的的模块,python2用pip,python3用pip3