AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[windows-subsystem-for-linux](ubuntu)

Martin Hope
SIMEL
Asked: 2024-08-28 04:34:36 +0800 CST

由于 Exec 格式错误,/usr/bin/node 无法运行

  • 6

当我尝试在 Windows(WSL)上的 Ubuntu 22.04 上运行时node出现错误:

-bash:/usr/bin/node:无法执行二进制文件:可执行格式错误

我尝试重新安装它

 sudo apt install --reinstall nodejs

npm当完全卸载并重新安装它们没有帮助时。

在该文件上运行所产生的结果与在有效的文件file上运行所产生的结果相同。ls

$ file /usr/bin/node
/usr/bin/node: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d7abab52c01bf27bc053d24b0fad7f95c9e50d2f, for GNU/Linux 3.2.0, stripped
$ file /usr/bin/ls
/usr/bin/ls: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=897f49cafa98c11d63e619e7e40352f855249c13, for GNU/Linux 3.2.0, stripped

我该如何修复我的节点?

我的 WSL 和 Windows 版本:

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22621.3880

Ubuntu 发行版:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
windows-subsystem-for-linux
  • 2 个回答
  • 66 Views
Martin Hope
Parduz
Asked: 2024-04-18 20:57:01 +0800 CST

如何为armhf安装旧版本的GCC?

  • 5

我并不是真正的linux专家,所以我感觉有点迷失。

我正在 WSL 中运行 Ubuntu 22.04.3 LTS 映像,因为我需要使用 Windows PC 为 ARM Linux PC 交叉编译程序。该图像是由 Powershell 命令自动安装的WSL.exe --install,我对此很满意。

我已经能够添加armhf架构、gcc-arm-linux-gnueabihf和 来构建我的程序。

问题是 GCC 的版本是 11,而 glibc 对于 ARM 机器的 debian 映像来说太新了。

所以我需要降级到 GCC-10。

我可以删除安装的GCC,但是然后呢?如何安装gcc-arm-linux-gnueabihfv10?

windows-subsystem-for-linux
  • 1 个回答
  • 26 Views
Martin Hope
w41g87
Asked: 2024-04-02 07:10:54 +0800 CST

WSL 能够触及文件,但 mkdir 产生权限被拒绝

  • 6

我正在中继我的 SSH 连接,并且我想限制远程用户查看我的文件的能力。我设置umask = 027为/etc/wsl.conf安装 Windows 文件系统,以便其他用户无法读取或写入 Windows 文件系统。然而,它似乎也以某种方式影响本地用户,因为我不能再mkdir作为本地用户使用

mkdir test

或者

sudo mkdir test

两者都会产生Permission denied错误但是,我可以

touch test

没有问题。我已检查当前文件夹的所有权是登录到 wsl 的本地用户。

windows-subsystem-for-linux
  • 1 个回答
  • 42 Views
Martin Hope
Ya.
Asked: 2024-01-27 23:41:23 +0800 CST

wsl2:resolv.conf 顽固地重新生成[重复]

  • 5
这个问题在这里已经有了答案:
在 WSL 2 中永久更改 /etc/resolv.conf (3 个答案)
昨天关门了。

我的/etc/wsl.conf:

[network]
generateResolvConf = false

然而我的 /etc/resolv.conf 仍在继续重新生成。我指定:

nameserver 8.8.8.8

却发现它变成了:

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.29.128.1

注意:我尝试了下面建议的解决方案,但没有一个有帮助:

为什么我的 resolv.conf 文件每次都会重新生成?

windows-subsystem-for-linux
  • 1 个回答
  • 63 Views
Martin Hope
R A
Asked: 2023-08-12 01:43:38 +0800 CST

WSL2 是否使用本机 Linux TCP/IP 堆栈?

  • 6

假设 Windows TCP/IP 实现中存在错误。WSL2 会受到影响吗?WSL2 Ubuntu 会使用本机 Linux 内核的 TCP/IP 堆栈吗?

windows-subsystem-for-linux
  • 1 个回答
  • 34 Views
Martin Hope
David S.
Asked: 2023-04-15 20:02:28 +0800 CST

从 WSL 启动 Emacs 时的警告和错误

  • 6

我有一个启用了systemd的 WSL Ubuntu 系统。我还配置snap并安装了我的Emacsusing snap。

当我从 WSL 控制台启动 Emacs 时,我可以看到 GUI 并使用 Emacs。但是我收到以下错误和消息。

Emacs 实例似乎功能齐全。所以,我认为错误/警告并不重要。但我想知道我是否可以修复或禁用触发它们的任何功能。

(emacs:587975): dbind-WARNING **: 18:37:34.363: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

(emacs:587975): GLib-GIO-CRITICAL **: 18:37:34.405: g_settings_schema_source_lookup: assertion 'source != NULL' failed
windows-subsystem-for-linux
  • 1 个回答
  • 45 Views
Martin Hope
anjanesh
Asked: 2023-02-24 13:58:29 +0800 CST

在 Windows 11 上通过 WSL 在 Ubuntu 22.04 上安装最新的 NodeJS

  • 6

我在 Windows 11 上通过 WSL 使用 Ubuntu 22.04。

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

正在返回:

## Installing the NodeSource Node.js 18.x repo...

## Populating apt-get cache...

+ apt-get update
Hit:1 https://apt.releases.hashicorp.com jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:4 https://packages.redis.io/deb jammy InRelease
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB]
Reading package lists... Done
E: Release file for http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease is not valid yet (invalid for another 5h 27min 34s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease is not valid yet (invalid for another 5h 27min 59s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease is not valid yet (invalid for another 5h 28min 40s). Updates for this repository will not be applied.
Error executing command, exiting
$ sudo head /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_InRelease
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Origin: Ubuntu
Label: Ubuntu
Suite: jammy
Version: 22.04
Codename: jammy
Date: Thu, 21 Apr 2022 17:16:08 UTC
Architectures: amd64 arm64 armhf i386 ppc64el riscv64 s390x

我是什么做的 ?

$date
Fri Feb 24 04:12:40 IST 2023
windows-subsystem-for-linux
  • 1 个回答
  • 19 Views
Martin Hope
efemboygg
Asked: 2023-02-08 11:39:17 +0800 CST

如何在 wsl2 ubuntu 上编辑 .tmux.conf?

  • 5

我正在学习学习 tmux 的教程,但在 ~/.tmux.conf 中找不到 .tmux.conf 文件,
我需要去哪里找到它或创建文件吗?
如果有任何改变,我也会在 wsl2 上运行它。
谢谢

windows-subsystem-for-linux
  • 1 个回答
  • 21 Views
Martin Hope
Nivlem
Asked: 2022-11-11 01:03:14 +0800 CST

WSL2可以使用安装在Windows上的Android SDK吗?

  • 6

我在 Windows 上安装了 android-sdk,并将其路径导出到ANDROID_SDK_ROOTWSL 环境变量。WSL 是否应该能够使用安装在 Windows 上的 SDK 编译我的项目?当我尝试构建我的 Cordova 项目时,它说我的 SDK 已损坏。这可能是原因吗?我已经卸载/重新安装了相同版本的 SDK 和其他几个,但问题仍然存在。

windows-subsystem-for-linux
  • 2 个回答
  • 64 Views
Martin Hope
Ian Blixt
Asked: 2022-10-07 11:47:28 +0800 CST

WSL Ubuntu 安装失败并出现错误:“请使用以下命令重新启动 WSL...”

  • 2

我第一次尝试在我的笔记本电脑上运行 Linux 程序。我的机器运行的是 Windows 11。我遵循了在 WSL 上安装 Ubuntu 的在线指南,例如此处的指南:

https://learn.microsoft.com/en-us/windows/wsl/install

https://learn.microsoft.com/en-us/windows/wsl/install-manual

https://learn.microsoft.com/en-us/windows/wsl/setup/environment

但是当我安装 Ubuntu 时,出现下图中的错误:

错误信息

这是我一直在运行以尝试解决的命令。

确认 WSL 已安装:

PS C:\Users\User> wsl --install

Windows Subsystem for Linux is already installed.
The following is a list of valid distributions that can be installed.
Install using 'wsl --install -d <Distro>'.

NAME               FRIENDLY NAME
Ubuntu             Ubuntu
Debian             Debian GNU/Linux
kali-linux         Kali Linux Rolling
SLES-12            SUSE Linux Enterprise Server v12
SLES-15            SUSE Linux Enterprise Server v15
Ubuntu-18.04       Ubuntu 18.04 LTS
Ubuntu-20.04       Ubuntu 20.04 LTS
OracleLinux_8_5    Oracle Linux 8.5
OracleLinux_7_9    Oracle Linux 7.9

PS C:\Users\User> wsl -l -v
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore

安装 Ubuntu,启动,获取附件图像中的错误消息。按照该错误消息中的命令说明进行操作:

PS C:\Users\User> wsl --shutdown
PS C:\Users\User> wsl --unregister Ubuntu
Unregistering...
There is no distribution with the supplied name.

手动卸载 Ubuntu:

PS C:\Users\User> wsl --install -d Ubuntu
Installing: Ubuntu
Ubuntu has been installed.
Launching Ubuntu...

在单独的 Ubuntu 外壳中:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Press any key to continue...

我已经启用了虚拟化,并通过以下方式确认systeminfo.exe:

PS C:\Users\User> systeminfo.exe
...
Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes
windows-subsystem-for-linux
  • 1 个回答
  • 1230 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve