分类 电脑 下的文章

在ubuntu里编辑安装 pythin 3.8.1 但执行pip install 出错 提示 No module named '_ctypes'

环境:ubuntu 18,默认系统安装有python2.7和python3.5。下载python3.8.1的源码编译安装后运行pip安装新包,提示出错, 类似 Python3: ImportError: No module named '_ctypes' when using Value from module multiprocessing 的错误信息。

尝试:apt-get install libffi-dev 后重新编译安装python3.8.1后正常了。

参考:https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul

Debian9 中的 MariaDB Unix Socket 的认证插件

环境:Debian9,安装了 MariaDB。
问题:root用户从ssh登录后,输入mysql命令即可转到MariaDB的命令台,无需密码。如使用 UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; 的命令设置一个非空密码,但无法凭新密码登录到数据库,还是空密码。

尝试:在命令台,执行 UPDATE mysql.user SET plugin="" WHERE User='root'; 后应该可以为root用户禁用 Unix Socket 认证。

参考:

magento2 - 安装报错 - You do not have the SUPER privilege and binary logging is enabled

环境:nginx,php7.3,mysql5.7,magento2.3.4的tgz包。

通过浏览器安装magento2时,报错:You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

尝试:以root用户连接到mysql命令台,执行 set global log_bin_trust_function_creators=1;

参考:https://magento.stackexchange.com/questions/144713/magento-2-1-data-migration-super-privilege-error

xampp php 7.4 - apache启动失败 - vcruntime140.dll not compatible with PHP - Visual C++ Redistributable for Visual Studio 2019

现象:安装了 xampp php 7.4.3,但 apache 启动失败。

尝试:

  1. 查看 apache 的错误日志内容,有如 vcruntime140.dll not compatible with PHP 的提示信息
  2. 如在apache的配置文件中,不加载php7的模块,可以成功启动
  3. 查看到当前Windows安装了Visual C++ Redistributable for Visual Studio 2017
  4. 但网上搜索得,php 7.4 的Windows运行环境,可能需要更高版本的 Visual C++ Redistributable for Visual Studio 2019
  5. 下载和安装 Visual C++ Redistributable for Visual Studio 2019 后,apache php 可以正常启动了

参考:

修改 iredmail 套件中 roundcube web邮箱登录界面的logo

环境:CentOS7 里安装了 iredmail-1.1。

过程:

  1. /opt/www/roundcubemail/skins/elastic/images/logo.svg # 替换默认 roundcube 的logo
  2. /opt/www/roundcubemail/skins/elastic/images/favicon.ico # 替换默认 roundcube 的站标
  3. 在 /opt/www/roundcubemail/config/config.inc.php 配置文件里,增加一行,修改登录界面的文字说明,默认是“Roundcube Webmail”,如 $rcmail_config['product_name'] = 'AnQun Webmail';

参考: