我在 WSL 中使用 Ubuntu 20.04,如果我不使用--no-sandbox
Google Chrome,它将无法在 WSL 上运行,为什么?运行命令后,屏幕截图中显示了错误消息google-chrome --no-sandbox
但是打开是正常的。
当我在文本框中编辑文本时,我按下该backspace键,而不是将光标移回并删除一个字符,它就像我点击了浏览器顶部的上一个箭头一样。Brave 和 Edge 中都会发生这种情况。如果我按住该shift键,我会得到正常的backspace按键行为,但速度会更慢。
这刚刚开始发生。我重启后仍然出现这种情况。我使用的是 Ubuntu 22.04。
是什么原因造成的?请注意,这涉及编辑文本,例如输入搜索词时。当我点击时,backspace它会带我回到另一个网页,就像我点击了浏览器顶部的上一个箭头一样。
发生这种情况:
勇敢的:
边缘:
以下情况不会发生:
我有几个虚拟机是用 VirtualBox 使用的(现在我在 Ubuntu 24.10 下运行 v7.0)。其中有些几个月前运行过的虚拟机现在都不能运行了。实际上,我无法将它们添加到 VirtualBox 中,它拒绝打开它们并出现以下错误:
NS_ERROR_INVALID_ARG (0X80070057)
经过搜索,似乎这是一个相当通用的错误代码,并没有说明根本原因。我确信文件没有损坏:不同的 SSD 和我也有备份,但行为是一样的。
此外,我检查了虚拟机和主机的日志(在~/.config/VirtualBox
),但当发生此错误时,它们没有更新。
我现在陷入困境,我必须运行这些机器,但我甚至无法添加它们来更改设置。由于没有可用的日志,而且错误很普遍,我该怎么做才能调试这个问题?
如果这很重要,那么所有表现出此行为的虚拟机都将 Windows 10 作为客户操作系统
根据评论中的提示,我创建了一个新的 VBox,并添加了相同的视频。现在它拒绝运行,说缺少操作系统。 在这里我上传了日志文件。
这是失败的部分:
00:00:00.629510 Changing the VM state from 'POWERING_ON' to 'RUNNING'
00:00:00.629514 Console: Machine state changed to 'Running'
00:00:00.630193 VMMDev: Guest Log: BIOS: VirtualBox 7.0.22
00:00:00.630232 PCI: Setting up resources and interrupts
00:00:00.630850 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:00.631342 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 800x600
00:00:00.631444 GUI: HID LEDs sync is not supported on this platform
00:00:00.634813 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:00.648272 VMMDev: Guest Log: CPUID EDX: 0x178bfbff
00:00:00.648480 VMMDev: Guest Log: BIOS: No PCI IDE controller, not probing IDE
00:00:00.648593 AHCI#0: Reset the HBA
00:00:00.648595 VD#0: Cancelling all active requests
00:00:00.648617 AHCI#0: Port 0 reset
00:00:00.648630 VD#0: Cancelling all active requests
00:00:00.648836 VMMDev: Guest Log: BIOS: AHCI 0-P#0: PCHS=16383/16/63 LCHS=1024/255/63 0x000000000dc00000 sectors
00:00:00.648864 AHCI#0: Port 1 reset
00:00:00.649462 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:00.685814 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000793114000000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
00:00:00.761245 GUI: UIMediumEnumerator: Medium-enumeration finished!
00:00:03.130467 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:03.130566 VMMDev: Guest Log: BIOS: Boot : bseqnr=1, bootseq=0231
00:00:03.130635 VMMDev: Guest Log: BIOS: Boot from Floppy 0 failed
00:00:03.130714 VMMDev: Guest Log: BIOS: Boot : bseqnr=2, bootseq=0023
00:00:03.131020 VMMDev: Guest Log: BIOS: CDROM boot failure code : 0003
00:00:03.131082 VMMDev: Guest Log: BIOS: Boot from CD-ROM failed
00:00:03.131157 VMMDev: Guest Log: BIOS: Boot : bseqnr=3, bootseq=0002
00:00:03.131967 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:00:03.132021 VMMDev: Guest Log: BIOS: INT18: BOOT FAILURE
00:00:03.132038 PcBios: Boot failure
00:00:03.132051 VM: Raising runtime error 'VMBootFail' (fFlags=0x0)
00:00:03.132054 Console: VM runtime error: fatal=false, errorID=VMBootFail message="The VM failed to boot. This is possibly caused by not having an operating system installed or a misconfigured boot order. Maybe picking a guest OS install DVD will resolve the situation"
似乎没有找到硬盘,但 vdi 文件已连接到 SATA 控制器
我有一个关于 Ubuntu 全盘加密的简单问题。
我想在我的笔记本电脑上安装带有全盘加密的 Ubuntu 24.04,但我还需要用 C 语言做一个面向操作系统的项目,用于我在大学里要上的课程。
我想知道全盘加密是否会对使用 C 的内置函数进行文件 I/O 造成一些问题?
如果这是一个愚蠢的问题,我很抱歉,但我不确定我是否已经很好地理解了 LUKS 的工作原理,以及加密/解密是在哪个级别完成的。
我的 Raspberry Pi 5 SBC 上的 PXE 启动已完成 99% 的工作 - 除了apt-get update
正常工作之外,其他一切都正常。我的环境是 TrueNAS Scale 上的 TFTP 服务器,有 2 个 NFS 共享,一个用于 tftpboot,一个用于根文件系统。DHCP 设置 66 可以毫无问题地分发 TFTP IP 地址。
新的额外信息:我发现这不仅仅是 Raspberry Pi OS 的问题。如果我使用 DietPi(同样基于 Debian),也会发生同样的事情:
Err:15 https://dietpi.com/apt bookworm InRelease
At least one invalid signature was encountered.
获取根文件系统文件的过程是:
--perms
并且我已验证目标上的权限与源上的权限相同。但是,当 pi5 从 PXE 启动时,apt-get update
无法运行并抛出以下错误:
me@raspberrypi:~ $
me@raspberrypi:~ $ sudo apt-get update
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Err:1 http://deb.debian.org/debian bookworm InRelease
At least one invalid signature was encountered.
Err:2 http://deb.debian.org/debian-security bookworm-security InRelease
At least one invalid signature was encountered.
Err:3 http://deb.debian.org/debian bookworm-updates InRelease
At least one invalid signature was encountered.
Get:4 http://archive.raspberrypi.com/debian bookworm InRelease [39.3 kB]
Err:4 http://archive.raspberrypi.com/debian bookworm InRelease
At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://deb.debian.org/debian bookworm InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://deb.debian.org/debian-security bookworm-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian-security bookworm-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://deb.debian.org/debian bookworm-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian bookworm-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.raspberrypi.com/debian bookworm InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.raspberrypi.com/debian bookworm InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
me@raspberrypi:~ $
允许不安全和未经身份验证的存储库得到进一步发展,但仍然会失败,并出现以下错误:
W: GPG error: http://deb.debian.org/debian bookworm InRelease: At least one invalid signature was encountered.
W: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
下面的 apt 示例安装了 nginx,但请注意以下行:
WARNING: The following packages cannot be authenticated!
nginx-common nginx
以下是完整输出:
me@raspberrypi:~ $ sudo apt-get install nginx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
nginx-common
Suggested packages:
fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
nginx nginx-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 606 kB of archives.
After this operation, 1,708 kB of additional disk space will be used.
Do you want to continue? [Y/n]
WARNING: The following packages cannot be authenticated!
nginx-common nginx
Install these packages without verification? [y/N] y
Get:1 http://deb.debian.org/debian bookworm/main arm64 nginx-common all 1.22.1-9 [112 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 nginx arm64 1.22.1-9 [494 kB]
Fetched 606 kB in 1s (541 kB/s)
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 78339 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.22.1-9_all.deb ...
Unpacking nginx-common (1.22.1-9) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.22.1-9_arm64.deb ...
Unpacking nginx (1.22.1-9) ...
Setting up nginx-common (1.22.1-9) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service.
Setting up nginx (1.22.1-9) ...
Upgrading binary: nginx.
Processing triggers for man-db (2.11.2-2) ...
me@raspberrypi:~ $
这表明这不是文件系统权限问题,否则无法安装新软件包。重新启动后,nginx 仍然存在并且运行良好,因此文件系统持久性也正常工作。
注意我可以按照官方安装说明添加新的 repos,例如 Docker repo。
这不是 Docker 的问题,正如许多其他搜索结果所暗示的那样;除了上述测试之外,Docker repo 从未安装在该系统上。有足够的磁盘空间可用,所以也不是这个问题。
是什么原因造成的?临时使用一个空的 apt sources.list
,并sources.list.d
允许 apt 运行而不会抛出错误,正如预期的那样。添加新的 repo 并运行后sudo apt-get update
一切正常,所以它肯定与 SD 卡安装中的现有 repo 有关。恢复上述复制的文件会直接导致错误再次出现。
我搜索了很多,发现了几个相同的错误,但它们的解决方案在这里不起作用,例如
挂起后我的键盘无法工作(即使使用 ++ 之类的命令ctrl)alt,f2如果我合上盖子,将其翻转,然后打开盖子,键盘就可以工作。电源和重新加载等固件命令有效。我尝试过以下方法:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash atkbd.reset"
我正在使用运行 mrchromebox 的 rw 旧版固件的 Acer Chromebook Spin 512 r851TN。
OS: Ubuntu 24.04.1 LTS x86_64
Host: Bobba rev4
Kernel: 6.8.0-51-generic
Uptime: 8 hours, 15 mins
Packages: 1765 (dpkg), 14 (snap)
Shell: bash 5.2.21
Resolution: 1366x912
DE: GNOME 46.0
WM: Mutter
WM Theme: Adwaita
Theme: Yaru [GTK2/3]
Icons: Yaru [GTK2/3]
Terminal: gnome-terminal
CPU: Intel Pentium Silver N5030 (4) @ 3.100GHz
GPU: Intel GeminiLake [UHD Graphics 605]
Memory: 2206MiB / 7804MiB
PasteBin 上的 Dmesg 输出:https ://pastebin.com/282H720B
编辑:当我说翻转时,我的意思是将计算机旋转到其背面,然后打开盖子。
我正在尝试编写一个 bat 文件,它可以安装特定的发行版并准备以最少的用户交互来执行某些操作。
我使用的命令是wsl --install Ubuntu-24.04
。
这个命令有效,它会要求输入用户名、密码等所有信息,但是一旦安装了所有信息,bat 文件就会卡在 Linux shell 中,用户必须键入内容exit
才能退出 shell 才能继续运行 bat 文件。
当尝试时wsl --install Ubuntu-24.04 --no-launch
,命令返回到 bat 文件,但是当我尝试运行下一个命令时wsl -d Ubuntu-24.04 -- exit
(实际启动发行版以执行其他命令),我收到错误代码Wsl/Service/WSL_E_DISTRO_NOT_FOUND
。
发行版在运行时也不会显示wsl --list
,因为显然--no-launch
它不仅“无法启动”,而且“无法(正确)安装”。更确切地说,它所做的只是“下载以供以后安装”。
运行echo exit | wsl --install Ubuntu-24.04
也不起作用,因为第一个输入需要是用户名,然后是密码。即使我先从脚本中查询两者,单是用户名就已经给我带来了错误。
我成功将卷附加到我的 ubuntu 主机,如下所示。
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.2G 2.1M 3.2G 1% /run
/dev/sda2 99G 37G 58G 39% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sdb 100G 2.0G 98G 2% /data
tmpfs 3.2G 28K 3.2G 1% /run/user/1001
但是/dev/sdb
对于在该主机上运行的应用程序不可用。引发的错误是 could not extend file "base/16384/17093": No space left on device\nHINT: Check free disk space.
我正在尝试使用 FastAPI 服务器在我的 Raspberry Pi 和 Ubuntu 桌面之间设置文件传输。这是我的设置:
FastAPI 服务器设置:
2121
。静态 IP 设置:
172.168.4.50
(通过路由器设置确认)。2121
到 Ubuntu 桌面的本地 IP。测试设置:
http://localhost:2121/
)。http://172.168.4.50:2121/
从网络外部访问时,请求失败。采取的故障排除步骤:
经过一番研究,我发现它172.168.4.50
属于私有 IP 范围(172.16.0.0
到172.31.255.255
)。据我所知,私有 IP 在公共互联网上不可路由。
应该可以从任何地点使用 ISP 分配的静态 IP 和端口来访问该 API 2121
。
即使配置了端口转发,请求仍然会http://172.168.4.50:2121/endpoint
失败并超时。
我遇到这个问题时,我正在 Ubuntu VM 上使用 nginx 来托管一个非常基本的网站。该网站非常基础,实际上只托管一张图片和一个按钮。
每当我这样做时sudo systemctl restart nginx
,这似乎可以暂时“解决”问题。但是当我在手机和桌面上重新测试网站并刷新几次以模拟轻度和正常使用时。最终,网页需要很长时间才能响应,并且会出现“无法访问服务器”错误。
这是我的配置文件:我花了几个小时在网上搜索并把各种建议拼凑在一起,才开发出这个配置文件。我觉得这是一个我忽略的超级简单的修复方法,因为根据网络,nginx 应该可以同时处理数千个连接而不会出现问题。我在 i7 10750 上运行带有 4GB RAM 和 3 个内核的服务器。请帮忙。请参阅配置文件以了解我尝试解决问题的方法,但就像我说的,随着时间的推移或经过一定数量的新连接和刷新后,它变得难以忍受地慢,并且在某个时间点之后无法再连接到服务器。
编辑:跟踪错误日志文件不会产生任何错误,而其他日志文件最终在网站加载时仅输出预期的输出。
EDIT2:进一步挖掘后,我发现请求 SSL 需要的时间太长了。通常在服务器重新设置后,运行此命令只需几分之一秒:curl -w "\nSSL Handshake Time: %{time_appconnect}\nTotal Time: %{time_total}\n" -o /dev/null -s https://directinghomesolutions.com
但是,尝试反复执行此命令时,我会得到混合结果,从 8 秒以上一直到某些时候的 100 秒。有人对如何缩短时间有什么建议吗?
编辑 3:我搞明白了,我需要出去为我的电脑买一个网络适配器,然后允许 VM 通过 USB 端口直接使用它。之后,我通过路由器为端口 80 和 443 设置了正确的端口转发,如果您的路由器遇到同样的问题,请务必仔细检查您的 SSL 证书安装等。结果发现这与 NGINX 无关(或几乎无关)。