/images/avatar.png

Ubuntu配置VNCServer,一定能用,不白屏灰屏

安装基础软件 1 2 3 sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal sudo apt install tightvncserver vncserver 修改~/.vnc/xstartup 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #!/bin/bash export $(dbus-launch) export XKL_XMODMAP_DISABLE=1 export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity" export XDG_MENU_PREFIX="gnome-flashback-" unset SESSION_MANAGER gnome-panel & gnome-settings-daemon & metacity & nautilus & gnome-terminal & # [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup # [ -r $HOME/.

CUDA unknown error - this may be due to an incorrectly set up environment

Problem description 1 2 3 4 5 6 >>> torch.cuda.is_available() /home/python3.8/site-packages/torch/cuda/__init__.py:141: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /opt/con da/conda-bld/pytorch_1708025845899/work/c10/cuda/CUDAFunctions.cpp:108.) return torch._C._cuda_getDeviceCount() > 0 False But both nvcc - V and nvidia-smi still work Solution 1 2 sudo rmmod nvidia_uvm sudo modprobe nvidia_uvm

ubuntu 18.04 升级至 glibc_2.28

近期在ubuntu 18.04上开发PyQt6前段时发现问题: ubuntu 18.04.6 默认的 glibc 版本位 2.27, 在运行最新的 Qt Creator 6.0.2 时会报错 1 $ /opt/Qt/Tools/QtCreator/bin/qtcreator 报错 1 /opt/Qt/Tools/QtCreator/bin/qtcreator: /lib/x86_64-linux-gnu/libc.so.6: version `glibc_2.28' not found 此时最佳方法是升级到 ubuntu 20.04 或 ubuntu 22.04, 还有一种"比较省心"的方法, 保留系统仅升级 glibc 下载 https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.xz 准备编译环境 1 $ sudo apt install build-essential gawk bison 然后解压和编译 1 2 3 4 5 6 $ tar -xJf glibc-2.28.tar.xz $ cd glibc-2.28/ $ mkdir build $ cd build $ ../configure --prefix=/usr $ make 到这一步后不要 sudo make install 立刻安装到 /usr