一、创建环境常见问题
1.1 windows11下打开虚拟机蓝屏问题
参考这篇文章,控制面板,启用和关闭windows功能(对话框)
(113条消息) VMware安装Ubuntu开启蓝屏解决方案_ubuntu蓝屏_云深不知处135的博客-CSDN博客
二、安装完成后的环境配置
安装完成Ubuntu之后,一般需要进行如下环境配置:
解决复制粘贴问题、下载源替换、sudo apt-get update一下、中文输入法、网络问题
下载gcc:sudo apt-get install gcc
本章最后一小节有遇到的一些错误以及解决办法
2.1 解决Ubuntu与Windows不能复制粘贴问题
百试不爽
1.下载安装两个软件:
sudo apt-get autoremove open-vm-tools
sudo apt-get install open-vm-tools-desktop
安装过程中,yes或者y一路通过。
2.然后重启ubuntu就可以了。
(113条消息) 解决Ubuntu与Windows不能复制粘贴问题_ubuntu与windows之间不能复制粘贴_偏安一隅,占山为王的博客-CSDN博客
2.2 下载镜像的更换 等
(113条消息) Ubuntu基础环境搭建_ubuntu编译环境搭建_偏安一隅,占山为王的博客-CSDN博客
2.3 Ubuntu 中文输入法
https://blog.csdn.net/fr16021028/article/details/125891812
2.4 vs2019与ubuntu的ssh连接
(113条消息) VS2019与Ubuntu之间ssh连接_vs2019 ssh_偏安一隅,占山为王的博客-CSDN博客
不过现在已经是vscode了,感觉vscode要更加方便一些
2.5 问题
(1) sudo apt-get update出现如下错误
(appstreamcli:6174): GLib-ERROR **: 02:35:15.404: g_variant_new_parsed: 11-13:invalid GVariant format string
Trace/breakpoint trap (core dumped)
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi'
E: Sub-process returned an error code
解决:
sudo apt-get install --reinstall libappstream4
(2)sudo apt install ibus
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
解决:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
sudo dpkg --configure -a
sudo apt update