Saki's 研究记录

docker-compose 部署 Redis 的异常解决
背景使用docker-compose部署Redis后,拉起服务后通过docker log查看有异常报错。。。 内核参数 overcommit_memory1WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl ...
Python3安装pandas报错Could not import the lzma module
环境 Centos: Linux release 8.4.2105 (Core)Python: 3.9.5GCC: 8.4.1 20200928 (Red Hat 8.4.1-1) 问题在Centos安装pandas包后运行报错: 1Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError. 原因及解决办法因为我环境上的Python 3.9.5是源码安装的,所以必须预先安装...
go get fails with permission denied on certain go packages
Permission denied下载第三方库的时候,编译时会提示Permission denied权限不足,出现这种错误因为权限不够。有一种最快的办法就是把你的go目录权限放开: 1sudo chmod -R 777 -R go Reference`go get` fails with permission denied on certain go packages Done.
Golang 交叉编译报错 XX is invalid in C99
环境 macOS: 11.6.1 (Big Sur)gcc version: apple clang version 13.0.0 (clang-1300.0.29.3)Ubuntu: 16.04.6 LTSCentOS: Linux release 8.4.2105 (Core) 背景最近在使用redis-full-check来对比两个redis的数据是否一致,在macos上进行开发,编译后再上传到ubuntu系统的服务器上运行。 问题这就导致我需要使用到golang的交叉编译,golang默认支持交叉编译,只在编译时配置对应平台的编译参数即可: 123456# linuxCGO_E...
MySQL: Authentication plugin 'caching_sha2_password'
版本信息Server version: 8.0.21 问题使用docker在服务器上运行了一个mysql容器,进入容器内部登录mysql正常,端口已映射到虚拟机上,访问正常。使用工具连接,确认用户名、密码和IP端口正确的情况下报错: 1Authentication method 'caching_sha2_password' not supported by any of the available plugins 原因这个问题的根本其实就是登陆加密的规则不一样,mysql8之前的版本使用的密码加密规则是mysql_native_password,但是在mysql8...
服务器不能发邮件并报错 Connection timed out
问题最近想使用docker搭建smtp服务玩玩,服务拉起来了但发不出邮件。例如发邮件给自己的126.com的邮箱,日志一直刷屏: 1234SMTP | 285 Connecting to 126mx02.mxmail.netease.com [220.181.15.151]:25 ... failed: Connection timed out (timeout=5m)SMTP | 285 LOG: MAINSMTP | 285 H=126mx02.mxmail.netease.com [220.181.15.151] Connection timed ...
No module named '_ssl'
环境 系统: CentOS Linux release 8.4.2105 (Core) 背景安装后 Jupyter Notebook后,执行jupyter notebook出现如下报错: 1234567891011jupyter notebookTraceback (most recent call last): File "/usr/local/python3/bin/jupyter-notebook", line 5, in <module> from notebook.notebookapp import main File "...
Samba 挂载失败记录
Q1问题CentOS命令行执行挂载命令: 1mount -t cifs -o user=<USERNAME>,pass=<PASSWORD> //<REMOTEIP>/share_folder /mnt/share_folder 报错mount point does not exist的原因是挂载点/mnt/share_folder不存在,所以执行挂载时提示这个错误。 解决需要预先创建好挂载点的目录。 1mkdir -p /mnt/share_folder 然后再重新进行挂载即可。 有问题么,没有问题,那么问题来了。 Q2问题CentOS挂载CIFS类...
go mod: disallowed version string
问题通过go get拉取公司私有包的时候报错:invalid: disallowed version string,但master、develop分支则可以正常拉取。有问题的分支名为feature/xxxx,现象: 12go get -u gitlab.xxxx.com/xxxx@feature/xxxxgo get: gitlab.xxxx.com/xxxx@feature/xxxx: invalid version: version "feature/XXXX" invalid: disallowed version string 解决问题的关键在分支名称中的&...
ModuleNotFoundError: No module named 'urllib3'
问题执行命令时报错: 1ModuleNotFoundError: No module named 'urllib3' 解决办法安装urllib3包: 123pip install urllib3# ORpython -m pip install urllib3 如果你的机器上同时安装有Python2和Python3的话,执行这个命令可能会存在显示安装成功,但执行命令时还是会报错。以防万一,可以执行 123pip3 install urllib3# ORpython3 -m pip install urllib3 Done.