Linux
2026
从一次训练集群卡顿,理解 Linux Overcommit
·7429 words·15 mins
起因 # 最近偶然看到一篇文章,里面提到一个 Linux 和 Windows 的差异:在 Linux 下,即使机器实际上没有足够的物理内存,一个很大的 malloc 仍然可能成功返回。而 Windows 对 committed memory 的管理要严格得多,类似的 allocation 更容易被直接拒绝。
2020
2018
解决ubuntu 14.04 下 壁纸软件 variety 崩溃 ValueError: bad marshal data (unknown type code) 的问题
系统为ubuntu 14.04
迫于特别想定时换壁纸,查了下解决方案。
发现只要删除掉/usr目录下所有的’.pyc’文件就可以
linux/win双系统 更新win后 grub 出现 Error: unknown filesystem 的解决办法
windows自己更新把grub更新挂了….
更新的时候要重启几次,重启一次挂一次…
linux 下 .o 文件,.a 文件,.so 文件
发现我对工程一无所知 QAQ。
参考资料:
Library Archives: Static and Dynamic
简单地说,.a 文件是静态库,而 .so 文件是共享对象(动态库),作用类似 Windows 下的 DLL。
mysql 出现 innoDB: Cannot allocate memory for the buffer pool 的解决办法
emmm,博客的数据库又挂了。
看了下log,发现innoDB: Cannot allocate memory for the buffer pool 的error
2017
安装win10后导致grub 引导缺失的解决办法
我之前是单系统manjaro,装了win10以后,grub menu直接消失不见…
ubuntu 包管理(apt-get)损坏的解决办法
症状是不管安装什么,都会说有一大堆依赖无法安装。。。
大概是: a depends b[i],but b[i] is not be installed. (b==0..n)
2017年3月更新archlinux后没有声音问题的解决办法
系统信息:
表现为不管外放还是耳机。。都没有声音。。。
解决办法:
1pacmd set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo+input:analog-stereo 参考资料
Linux 下各个目录的作用及内容
参考:FHS(Filesystem Hierarchy Standard)
其实这东西虽然有一个统一的标准,但是不同发行版,或者同一个发行版的不同版本,差异貌似都蛮大的。所以这里只是理论上各个目录的作用,可能和具体的发行版不符。。
2016
geekos project 1 (ELF文件相关)
一、目的 熟悉 ELF 文件格式,了解 GeekOS 系统如何将 ELF 格式的可执行程序装入到内存,建立内核进程并运行的实现技术。 二、流程 1、修改 /geekos/elf.c 文件:在函数 Parse_ELF_Executable( ) 中添加代码,分析 ELF 格式的可执行文件(包括分析得出 ELF 文件头、程序头,获取可执行文件长度,代码段、数据段等信息),并填充 Exe_Format 数据结构中的域值。 2、在 Linux 环境下编译系统得到 GeekOS 镜像文件。 3、编写一个相应的 bochs 配置文件。 4、在 bochs 中运行 GeekOS 系统显示结果。
2015
atom在linux下安装插件失败的解决方案
1gyp info it worked if it ends with ok 2gyp info using node-gyp@2.0.2 3gyp info using node@0.10.40 | linux | x64 4gyp http GET https://atom.io/download/atom-shell/v0.34.0/node-v0.34.0.tar.gz 5gyp WARN install got an error, rolling back install 6gyp ERR! install error 7gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and 8gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad 9gyp ERR! stack network settings. 10gyp ERR! stack at Request.<anonymous> (/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/install.js:234:21) 11gyp ERR! stack at Request.emit (events.js:95:17) 12gyp ERR! stack at Request.onRequestError (/opt/atom/resources/app/apm/node_modules/npm/node_modules/request/request.js:861:8) 13gyp ERR! stack at ClientRequest.emit (events.js:95:17) 14gyp ERR! stack at Socket.socketErrorListener (http.js:1548:9) 15gyp ERR! stack at Socket.emit (events.js:95:17) 16gyp ERR! stack at net.js:834:16 17gyp ERR! stack at process._tickCallback (node.js:448:13) 18gyp ERR! System Linux 3.16.0-38-generic 19gyp ERR! command "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.34.0" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" 20gyp ERR! cwd /home/rkz2013/.atom 21gyp ERR! node -v v0.10.40 22gyp ERR! node-gyp -v v2.0.2 23gyp ERR! not ok 解决办法是不用apm install 而是用npm install…之前要安装一个npm
wordpress无法创建目录/没有写权限的解决方案
终于解决了。
的确是权限问题。
但是由于初始化的时候,我错误的设置了数据库目录。应该为/alidata/www/serve/mysql ,而我设置成了/home/mysql