![安装 ubuntu 并删除 windows 后,mkdir 无法创建目录,没有这样的文件或目录](https://linux22.com/image/1191882/%E5%AE%89%E8%A3%85%20ubuntu%20%E5%B9%B6%E5%88%A0%E9%99%A4%20windows%20%E5%90%8E%EF%BC%8Cmkdir%20%E6%97%A0%E6%B3%95%E5%88%9B%E5%BB%BA%E7%9B%AE%E5%BD%95%EF%BC%8C%E6%B2%A1%E6%9C%89%E8%BF%99%E6%A0%B7%E7%9A%84%E6%96%87%E4%BB%B6%E6%88%96%E7%9B%AE%E5%BD%95.png)
所以我最近安装了 ubuntu。在此之前,我安装了 3 个驱动器的 Windows,即“C:/”、“Studies:/”等。
我只尝试删除 C 盘并在那里安装 ubuntu,我成功了。现在 Ubuntu 已安装;当我打开 Ubuntu 时,我“安装”了“Studies”驱动器。首先它以只读方式安装,因此我按照 google 将其更改为写入模式,使用以下命令:
sudo mount -o remount,rw /media/mzali/Studies
但是现在当我尝试创建目录或虚拟环境时出现此错误:
mkdir: cannot create directory ‘python_env’: No such file or directory
请注意,如果我使用 -p 标签,我也会得到它。以下是“cat /proc/mounts”的输出
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=3991148k,nr_inodes=997787,mode=755,inode64 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=805168k,mode=755,inode64 0 0
/dev/sda2 / ext4 rw,relatime,errors=remount-ro 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k,inode64 0 0
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1709 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
none /run/credentials/systemd-sysusers.service ramfs ro,nosuid,nodev,noexec,relatime,mode=700 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
/dev/loop2 /snap/core20/1778 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop0 /snap/core20/1587 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop1 /snap/bare/5 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop3 /snap/firefox/1635 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop4 /snap/firefox/2211 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop5 /snap/gnome-3-38-2004/112 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop6 /snap/gtk-common-themes/1535 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop7 /snap/snapd/17883 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop9 /snap/snapd-desktop-integration/14 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop11 /snap/snap-store/638 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop8 /snap/snap-store/582 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/loop10 /snap/gnome-3-38-2004/119 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/sda2 /var/snap/firefox/common/host-hunspell ext4 ro,noexec,noatime,errors=remount-ro 0 0
/dev/loop12 /snap/snapd-desktop-integration/49 squashfs ro,nodev,relatime,errors=continue 0 0
/dev/sda5 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run/snapd/ns tmpfs rw,nosuid,nodev,noexec,relatime,size=805168k,mode=755,inode64 0 0
nsfs /run/snapd/ns/snapd-desktop-integration.mnt nsfs rw 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=805164k,nr_inodes=201291,mode=700,uid=1000,gid=1000,inode64 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
portal /run/user/1000/doc fuse.portal rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sdb3 /media/mzali/Studies fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
我尝试进行了很多次谷歌搜索,针对这个问题有很多答案,但大多数只是使用“p”标签,这对我来说不起作用。
我切换到了 Ubuntu,这样就不会遇到安装不同软件时常见的 Windows 问题,但这种情况甚至更糟。
答案1
Windows 未完全删除。卸载“Studies”驱动器,运行ntfsfix
并重新安装“Studies”驱动器,即可使其正常工作。