会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
抬头=
博客园
首页
新随笔
联系
订阅
管理
2022年5月8日
unix网络编程POLLRDHUP坑
摘要: 这两个事件其实是一个东西,分别对应poll和epoll,通常用来判断对端是否关闭,但是当你对某个socket注册POLLIN和POLLRDHUP(EPOLLIN和EPOLLRDHUP)时,在对端关闭时,对于poll来说会一直触发POLLIN + POLLRDHUP事件,epoll也会触发EPOLLI
阅读全文
posted @ 2022-05-08 13:10 抬头=
阅读(65)
评论(0)
推荐(0)
2021年11月23日
将现有的linux打包成可供docker使用的tar包
摘要: tar --exclude=/proc --exclude=/sys \ --exclude=/dev --exclude=/run \ --exclude=/boot --exclude=/tmp \ --exclude=/var/cache \ --exclude=/var/log \ --ex
阅读全文
posted @ 2021-11-23 10:14 抬头=
阅读(202)
评论(0)
推荐(0)
2021年11月22日
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
摘要: apt install libgl1-mesa-glx -y
阅读全文
posted @ 2021-11-22 20:17 抬头=
阅读(196)
评论(0)
推荐(0)
UnicodeEncodeError: 'ascii' codec can't encode character '' in position 99
摘要: apt-get install locales dpkg-reconfigure locales 选择 en_US.UTF-8 export LANG="en_US.UTF-8"export LANGUAGE="en_US:en"export LC_ALL="en_US.UTF-8"
阅读全文
posted @ 2021-11-22 18:46 抬头=
阅读(43)
评论(0)
推荐(0)
linux下c语言编程通用的makefile文件编写
摘要: C语言的源文件和头文件放在src目录下,obj目录下存放目标文件 整个项目的目录结构为 ├── main├── Makefile├── obj│ └── main.o└── src └── main.c 只需make,就会自动编译好可执行文件main 附上makefile文件 CC=gcc CFLA
阅读全文
posted @ 2021-11-22 16:28 抬头=
阅读(162)
评论(0)
推荐(0)
linux下python换源
摘要: 临时安装 pip install torch -i https://mirrors.aliyun.com/pypi/simple/ 永久更换 现在当前用户家目录下创建.pip文件夹 mkdir ~/.pip 再在.pip文件夹下创建 pip.conf文本文件 pip.conf上的内容写 [globa
阅读全文
posted @ 2021-11-22 16:20 抬头=
阅读(528)
评论(0)
推荐(0)
linux下利用dd命令备份 gzip压缩 ssh远程拷贝备份
摘要: 把远程主机磁盘备份到本地 ssh user@ip "dd if=/dev/sda | gzip -1 -" | dd of=./backup.gz 把本地磁盘备份到远程主机 dd if=/dev/sda | gzip -1 - | ssh user@ip "dd of=backup.gz" 把远程备
阅读全文
posted @ 2021-11-22 15:23 抬头=
阅读(1491)
评论(0)
推荐(1)
公告