↓ 跳过正文
  1. 标签/

秘籍

2021

修复 ubuntu误删内核

·1 分钟
不小心把笔记本内核删掉了,导致无法开机,网上找了找教程: 用 ubuntu 安装盘启动系统,然后: sudo mount /dev/sda /media/a #看好自己的sda序号 sudo mount --bind /dev /media/a/dev sudo mount --bind /proc /media/a/proc sudo mount --bind /sys /media/a/sys sudo mount --bind /run /media/a/run sudo chroot /media/a apt-get install linux-image-generic grub-install /dev/sda exit sudo umount /media/a/sys sudo umount /media/a/proc sudo umount /media/a/dev sudo umount /media/a/run sudo umount /media/a reboot 重启电脑正常了。。。

Install Missing VMware Host Modules

·1 分钟
ubuntu 安装新内核v5.14后 vmware 无法使用处理办法: wget https://github.com/mkubecek/vmware-host-modules/archive/refs/tags/w16.1.2-k5.14.tar.gz tar -xzf w16.1.2-k5.14.tar.gz cd vmware-host-modules-w16.1.2-k5.14/ tar -cf vmmon.tar vmmon-only tar -cf vmnet.tar vmnet-only sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/ sudo vmware-modconfig --console --install-all 外部链接 # https://github.com/mkubecek/vmware-host-modules https://forums.linuxmint.com/viewtopic.php?t=324638

vmware-authdlauncher: error while loading shared libraries: libssl.so.1.0.2

·1 分钟
/usr/sbin/vmware-authdlauncher: error while loading shared libraries: libssl.so.1.0.2: cannot open shared object file: No such file or directory 处理办法: sudo ln -s /usr/lib/vmware/lib/libssl.so.1.0.2/libssl.so.1.0.2 /usr/lib/libssl.so.1.0.2 sudo ln -s /usr/lib/vmware/lib/libcrypto.so.1.0.2/libcrypto.so.1.0.2 /usr/lib/libcrypto.so.1.0.2 外部链接 # https://communities.vmware.com/t5/VMware-Workstation-Player/VMPlayer-16-1-on-Ububtu-20-10-Virtual-ethernet-failed-to-start/td-p/2826831

编译Win程序运行报错:go-sqlite3 requires cgo to work

·1 分钟
编译号程序放Windows运行报错 Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub, 按照下面参数编译就正常了 env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOOS=windows GOARCH=amd64 go build 安装 看看? apt-get install gcc-multilib apt-get install gcc-mingw-w64

2020

git 忽略本地修改,强制更新

·1 分钟
注意本地修改会丢失 # 下载最新 git fetch --all # 到其他分支 git reset --hard origin/master # 到某个更新 git reset --hard 9cb2d4d65c924bbeecf8398137ab310a4457a3fe git pull

Golang HTTP 请求同时支持 gzip deflate Brotli 编码

·1 分钟
可利用 https://github.com/andybalholm/brotli 加个简单判断就支持br压缩 😀。 go 语言 http 默认未传递Accept-Encoding参数会自动支持gzip压缩, 😱 一旦修改此标记所有解码都需要自己来处理,我选用https://github.com/klauspost/compress解压。