Linux 新手使用 Ubuntu 20.04.3 学习代码。
背景:今天早上,Ubuntu 提示我安装更新并重新启动。rbenv
本周我一直在安装 Ruby Gems,试图修复我的开发环境(我之前通过安装了 Ruby,sudo apt
但它造成了严重破坏)。我rbenv
工作正常,它将 Ruby 的全局版本设置为正确的最新版本,但我必须这样做source ~/.bash_profile
才能正确地添加垫片,否则它将默认为由 安装的 ruby apt
。在安装 rbenv 之前,我也sudo apt upgrade
从终端执行了此操作,一切都运行正常 3 天,直到我按照提示进行更新/重新启动。
现在,一片混乱。
尝试后source ~/.bash_profile
我收到以下错误:
/usr/lib/rbenv/libexec/rbenv-init: line 131: cannot create temp file for here-document: Read-only file system
尝试使用 GUI 保存任何文件时,我得到
Failed to save 'GREED_RULES.txt': Unable to write file '/home/vida/Desktop/koans/GREED_RULES.txt' (Unknown (FileSystemError): Error: EROFS: read-only file system, open '/home/vida/Desktop/koans/GREED_RULES.txt')
尝试sudo mount -o remount,rw /dev/sda5
并得到
mount: /: cannot remount /dev/sda5 read-write, is write-protected.
我的 etc/fstab 是
/etc/fstab: static file system information.
Use 'blkid' to print the universally unique identifier for a
device; this may be used with UUID= as a more robust way to name devices
that works even if disks are added and removed. See fstab(5).
<file system> <mount point> <type> <options> <dump> <pass>
/ was on /dev/sda5 during installation
UUID=a0f66c38-8b52-4d2f-87f2-a8ef1e49796b / ext4 errors=remount-ro 0 1
/boot/efi was on /dev/sda1 during installation
UUID=A88E-FD34 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw
我看过很多其他类似的问题,但它们一般都有 5-8 年的历史了,而且使用虚拟机,这是一个相当新的安装,也是这台机器上唯一的操作系统。