![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
踩坑笔记
search_star
个人博客seekstar.github.io
展开
-
rime切换全角标点和半角标点
ctrl+.来源:https://tieba.baidu.com/p/6000815719?red_tag=1579590982转载 2021-11-04 00:28:03 · 2776 阅读 · 0 评论 -
rust踩坑笔记
mpsc需求:需要在一个线程里读取数据,发送给另一个线程处理。我的方法:用mpsc的channel发送和接收。坑:mpsc的channel从不阻塞发送方,它有无限的缓冲。结果读取远远比写入快,导致大量内存被消耗。解决方案:用sync_channel:pub fn sync_channel<T>(bound: usize) -> (SyncSender<T>, Receiver<T>)这个bound参数应该指的是个数。文档:https://doc.ru原创 2021-09-29 15:54:29 · 326 阅读 · 0 评论 -
ModuleNotFoundError: No module named ‘jsonrpcclient.exceptions‘
jsonrpcclient当前的最新版本4.0.0好像已经没有jsonrpcclient.exceptions了。所以解决方案是回退到3.3.6版本:pip3 install jsonrpcclient==3.3.6参考文献:https://pypi.org/project/jsonrpcclient/#historypip install 安装指定版本的包...原创 2021-09-25 21:29:37 · 557 阅读 · 0 评论 -
rust error: linking with `cc` failed: exit code: 1
可能是磁盘空间没了。用df -h检查一下。原创 2021-08-20 15:34:42 · 1761 阅读 · 0 评论 -
login: abort requested by PAM
等个几分钟再试试就好了,原因未知。原创 2021-08-14 16:16:15 · 720 阅读 · 0 评论 -
pip3 search
这个命令官方停用了,可以先pip3 install pip-search然后 pip_search 搜。原文:https://segmentfault.com/q/1010000039360670转载 2021-08-10 22:05:02 · 1541 阅读 · 0 评论 -
qemu-bridge-helper: failed to create tun device: Operation not permitted
virsh start deepinerror: Failed to start domain deepinerror: internal error: /usr/lib/qemu/qemu-bridge-helper --use-vnet --br=br0 --fd=30: failed to communicate with bridge helper: 传输端点尚未连接stderr=failed to create tun device: Operation not permitted原因翻译 2021-08-08 20:48:29 · 1671 阅读 · 0 评论 -
qemu br0 access denied by acl file
echo "allow all" | sudo tee /etc/qemu/${USER}.confecho "include /etc/qemu/${USER}.conf" | sudo tee --append /etc/qemu/bridge.confsudo chown root:${USER} /etc/qemu/${USER}.confsudo chmod 640 /etc/qemu/${USER}.conf如果是qemu-kvm的话:echo "allow all" | sudo翻译 2021-08-08 18:04:15 · 748 阅读 · 0 评论 -
qemu-system-x86_64: warning: host doesn‘t support requested feature: CPUID.80000001H:ECX.svm [bit 2]
我在virtualbox里的虚拟机里用qemu创建虚拟机时报这个错。解决方法是在命令里加上-cpu hostsudo qemu-system-x86_64 -cpu host -m 1024 -enable-kvm centos.img -cdrom ~/Downloads/CentOS-8.2.2004-x86_64-minimal.iso不过仍然不会用上kvm的样子。参考:https://github.com/GNS3/gns3-server/issues/1639...原创 2021-08-08 03:14:47 · 2871 阅读 · 0 评论 -
git checkout 远程分支error
比如我有一个远程分支origin/test,正常情况下git checkout test的输出应该是Branch 'test' set up to track remote branch 'test' from 'origin'.Switched to a new branch 'test'但是我这里输出的是error: pathspec 'test' did not match any file(s) known to git.原因是我这里有两个远程都有分支test。把其中一个远程删掉就好了原创 2021-08-07 00:24:02 · 523 阅读 · 0 评论 -
Load key “/home/searchstar/.ssh/id_rsa_getip“: invalid format
如果是手动复制过来的,可能是结尾没有换行符。原创 2021-07-25 16:09:46 · 997 阅读 · 0 评论 -
ubuntu18 automake-1.16: command not found
但是ubuntu 18的automake是1.15的。其实不需要重新安装automake,直接跑下面的命令重新配置即可autoscanaclocalautoconfautomake --add-missing./configure然后make就不会报这个错了。原理见:https://blog.csdn.net/hubbybob1/article/details/109244833反正我没看懂...原创 2021-07-01 18:32:46 · 2590 阅读 · 4 评论 -
debian踩坑笔记
grub-installer fatal error:efi partition: primaryUnplug network wire: Even with mirror, http://security.debian.org/debian-security is still used, which is very slow.https://mirrors.ustc.edu.cn/help/debian.htmldeb http://mirrors.ustc.edu.cn/debian stabl原创 2021-06-01 23:43:52 · 837 阅读 · 0 评论 -
Command \algorithmic already defined
algorithmic包是比较老的包,与algpseudocode不兼容。正确使用方法:\usepackage{algorithm}\usepackage{algorithmicx}\usepackage{algpseudocode}用algorithmicx替代algorithmic。algorithmic里的伪代码都是大写的,algorithmicx里的伪代码是驼峰命名的,例如algorithmic里的\ENDIF在algorithmicx里是\EndIf。algorithmicx文档原创 2021-03-30 22:30:34 · 7750 阅读 · 3 评论 -
WPS编号后面有很大的空白
因为WPS编号后面默认是制表符。右键出问题的编号,选择“调整列表缩进”,在“编号之后”里把“制表符”换成“空格”就好了。原创 2021-03-22 16:36:00 · 11774 阅读 · 0 评论 -
error: use of deleted function ‘std::pair<const int, int>& std::pair<const int, int>::operator=(cons
error: use of deleted function ‘std::pair<const int, int>& std::pair<const int, int>::operator=(const std::pair<const int, int>&)’ c[0] = std::make_pair(1, 1); ^note: ‘std::pair<const int, int>原创 2021-02-22 14:23:25 · 2099 阅读 · 0 评论 -
/usr/bin/xauth: timeout in locking authority file /home/searchstar/.Xauthority
重启就好了。玄学原创 2021-02-02 16:48:44 · 988 阅读 · 0 评论 -
0xffffffffc1131d1d in ?? () Cannot find bounds of current function
其实并不是崩了,只是gdb找不到目前在哪一行而已。为了验证,输入l命令打印附近的代码(gdb) nCannot find bounds of current function(gdb) l221 unsigned long i;222 int ret = 0;223224 while (a * 5 < (1 << max_bits_a)) {225 a = a *原创 2021-01-23 00:38:06 · 1373 阅读 · 3 评论 -
降低内核模块编译优化等级时出错
在Makefile里加上-O0之后./include/linux/compiler-gcc.h:120:38: error: impossible constraint in ‘asm’ #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ^~~./arch/x86/include/asm/cpufeature.h:165:2: not原创 2021-01-23 00:29:26 · 1177 阅读 · 0 评论 -
deepin 20安装cuda
看这篇文章:https://flywine.blog.csdn.net/article/details/81879514根据https://blog.csdn.net/qq_27386899/article/details/104113553,要先卸载之前安装的nvidia的东西,否则会出错:sudo apt purge nvidia-*安装完之后cuda就能跑了,但是重启之后deepin好像会自己激活nouveau???查看/etc/modprobe.d/nvidia-installer-dis原创 2021-01-14 14:23:10 · 920 阅读 · 0 评论 -
解决manjaro中vim无法复制文本到系统剪切板的问题
sudo pacman -S gvim提示需要删除vim时选y原创 2021-01-01 11:38:10 · 818 阅读 · 2 评论 -
systemtap semantic error: no match (similar functions:
用户态probe文档:https://sourceware.org/systemtap/SystemTap_Beginners_Guide/userspace-probing.html这是process("PATH").function("function")报的错,意思是没有在ELF文件中找到这个函数对应的符号。大概率是因为ELF文件是用C++编译来的,符号名跟函数名不对应。例如对于以下程序:#include <stdio.h>void fun() { printf("Hello\原创 2020-12-27 00:43:39 · 486 阅读 · 0 评论 -
被锁保护的变量不需要使用volatile
https://stackoverflow.com/questions/6837699/are-mutex-lock-functions-sufficient-without-volatile因为进行函数调用的时候,编译器不知道它会不会修改全局变量,所以就防止了这个共享变量被放到寄存器中?原创 2020-12-01 09:59:28 · 283 阅读 · 0 评论 -
WPS图片章节编号
右键图片,选择题注,点击编号选中包含章节编号,并且留意章节起始样式。将章节标题设置成章节起始样式章节起始样式只能从几个标题里选。如果要选择其他样式作为章节起始样式,则可以右键样式栏里的标题,点击修改,然后选择基于的样式。...原创 2020-11-15 20:27:41 · 2954 阅读 · 0 评论 -
insmod: ERROR: could not insert module xxx.ko: Unknown symbol in module
意思是有些符号(大概率是函数)声明了但是未定义。sudo dmesg就可以看到是哪个符号出问题了。原创 2020-11-13 19:47:03 · 3729 阅读 · 0 评论 -
解决wps导出的PDF过大的问题
听说是因为wps把字库也给导出了。所以解决方法就是将导出的PDF再打印到文件,就可以把自带的字库去掉了。缺点就是超链接之类的会失效。原PDF:打印到文件后的PDF:原创 2020-08-25 10:39:21 · 6343 阅读 · 0 评论 -
virtualbox 6 虚拟机中使用USB3.0设备
参考:https://superuser.com/questions/1490216/virtual-box-6-0-12-does-not-recognize-usb-device-even-guest-addon-is-installed-ahttps://unix.stackexchange.com/questions/402400/windows-7-guest-in-virtualbox-not-recognizing-usb-3-0-devices首先安装virtualbox,并安装配套的原创 2020-08-24 21:11:35 · 2201 阅读 · 0 评论 -
bad decrypt 140291642319936:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
密码输错了。原创 2020-08-22 17:15:51 · 8688 阅读 · 1 评论 -
*** WARNING : deprecated key derivation used. Using -iter or -pbkdf2 would be better.
参考:https://unix.stackexchange.com/questions/507131/openssl-1-1-1b-warning-using-iter-or-pbkdf2-would-be-better-while-decrypting加上-pbkdf2即可。openssl aes-256-cbc -salt -pbkdf2 -in name -out name.aesopenssl aes-256-cbc -d -salt -pbkdf2 -in name.aes -out na原创 2020-08-22 16:01:01 · 7138 阅读 · 0 评论 -
vscode sudo: 有效用户 ID 不是 0,/usr/bin/sudo 位于一个设置了“nosuid”选项的文件系统或没有 root 权限的 NFS 文件系统中吗?
https://github.com/microsoft/vscode/issues/90725重启vscode即可。原因未知。原创 2020-07-28 22:38:49 · 5737 阅读 · 7 评论 -
支付宝 RSA2密钥长度不正确
要生成长度为2048的密钥。。。genrsa -out app_private_key.pem 2048rsa -in app_private_key.pem -pubout -out app_public_key.pem原创 2020-06-30 21:25:59 · 2067 阅读 · 1 评论 -
把boost::bind的返回值插入到std::unordered_map中
只能以insert的形式插入,不能以[]的形式插入。(可能是因为boost::bind的结果不是copyalbe的?)#include <iostream>#include <unordered_map>#include <boost/bind.hpp>using namespace std;struct A { void print(int ...原创 2020-05-03 12:56:26 · 213 阅读 · 0 评论 -
Clang 'constexpr' specifier is incompatible with C++98 [Semantic Issue]
参考:https://github.com/jbenden/vscode-c-cpp-flylint/issues/46https://clang.llvm.org/docs/DiagnosticsReference.html#wc-98-compat加上参数"-Wno-c++98-compat"即可消去这条warning。在vscode的flylint插件中,在settings.json...原创 2020-05-01 21:22:54 · 429 阅读 · 0 评论 -
github gist回滚版本
网页端好像没有回滚版本的功能。只能用命令行的样子。进入gist仓库后,地址栏的地址形如https://gist.github.com/你的用户名/XXXXX将地址copy下来,打开终端,执行git clone https://gist.github.com/你的用户名/XXXXX即可把gist clone下来,然后reset然后push -f就好了。...原创 2020-04-28 17:18:05 · 764 阅读 · 0 评论 -
boost::system::error_code赋值
参考:https://theboostcpplibraries.com/boost.systemboost::system::error_code error = boost::system::errc::make_error_code(boost::system::errc::success)原创 2020-04-25 16:57:05 · 927 阅读 · 0 评论 -
warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
参考:https://stackoverflow.com/questions/9147196/makefile-pass-jobs-param-to-sub-makefiles把make换成$(MAKE)例:debug: $(OBJS) cd server && $(MAKE) debug && mv bin/debug/* ....原创 2020-04-24 18:38:07 · 1137 阅读 · 0 评论 -
sha256sum文件哈希值和直接哈希字符串的哈希值不一样
例如在文件test.txt里写入test没有换行。然后sha256sum test.txt出来的结果是f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 test.txt但是在这个网站上http://encode.chahuo.com/输入test,然后以sha256方式哈希得到的结果是9f8...原创 2020-04-23 12:09:08 · 2805 阅读 · 0 评论 -
xv6踩坑笔记
lazy allocationtest pgbug: FAILED在系统调用函数(如sys_pipe)中,检测到致命错误(例如访问非法内存)时,不能直接用p->killed = 1,而是要return -1。原创 2019-12-16 16:33:55 · 2252 阅读 · 0 评论 -
javascript踩坑笔记
TypeError: _my_lib.default is not a functionimport { gen_index_of } from “./components/lib/my.lib”;一定要加{},如果写成import gen_index_of from “./components/lib/my.lib”;会报错:TypeError: _my_lib.default i...原创 2019-12-05 19:45:20 · 133 阅读 · 0 评论 -
git同步空文件夹
参考链接:https://www.iteye.com/blog/hbiao68-2103286在这个文件夹中建立一个空的.gitignore文件就好了(可以用touch命令)如果顶层的.gitignore中没有设置同步.gitignore文件的话,新建的这个.gitignore要写成这样才行:*!.gitignore顺便提一句,顶层的.gitignore要这样写:#ignore al...原创 2019-11-29 23:36:31 · 436 阅读 · 0 评论