WSL2のubuntu 20.04にUSBネットワークゲートをインストールし、次のカーネルバージョンをインストールしようとしています。
root@DESKTOP-N9UN2H3:~/Desktop# uname -a
Linux DESKTOP-N9UN2H3 5.8.0-rc3-microsoft-standard #2 SMP Tue Jun 30 14:38:02 CEST 2020 x86_64 x86_64 x86_64 GNU/Linux
残念ながら、修正方法がわからないエラーで終わります。
間違い!カーネル 5.8.0-rc3-microsoft-standard のカーネルヘッダファイルが見つかりません
root@DESKTOP-N9UN2H3:~/Desktop# dpkg -i usb_network_gate_x64.deb
(Reading database ... 352800 files and directories currently installed.)
Preparing to unpack usb_network_gate_x64.deb ...
Unpacking eveusb (9.1.0) ...
dpkg: dependency problems prevent configuration of eveusb:
eveusb depends on libqt4-dbus (>= 4.8.1); however:
Package libqt4-dbus is not installed.
eveusb depends on libqt4-svg (>= 4.8.1); however:
Package libqt4-svg is not installed.
dpkg: error processing package eveusb (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Errors were encountered while processing:
eveusb
root@DESKTOP-N9UN2H3:~/Desktop# apt install libqt4-dbus
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
eveusb : Depends: libqt4-svg (>= 4.8.1) but it is not going to be installed
libqt4-dbus : Depends: qdbus (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@DESKTOP-N9UN2H3:~/Desktop# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libfprint-2-tod1 libjpeg62 libllvm9:i386 libtirpc-common libtirpc3
linux-headers-5.4.0-39 linux-headers-5.4.0-39-generic
linux-image-5.4.0-39-generic linux-modules-5.4.0-39-generic
linux-modules-extra-5.4.0-39-generic
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libqt4-dbus libqt4-svg qdbus
The following NEW packages will be installed:
libqt4-dbus libqt4-svg qdbus
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 387 kB of archives.
After this operation, 947 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/rock-core/qt4/ubuntu focal/main amd64 qdbus amd64 5:4.8.7+dfsg-7ubuntu4rock7 [99.9 kB]
Get:2 http://ppa.launchpad.net/rock-core/qt4/ubuntu focal/main amd64 libqt4-dbus amd64 5:4.8.7+dfsg-7ubuntu4rock7 [76.0 kB]
Get:3 http://ppa.launchpad.net/rock-core/qt4/ubuntu focal/main amd64 libqt4-svg amd64 5:4.8.7+dfsg-7ubuntu4rock7 [211 kB]
Fetched 387 kB in 1s (502 kB/s)
Selecting previously unselected package qdbus.
(Reading database ... 352926 files and directories currently installed.)
Preparing to unpack .../qdbus_5%3a4.8.7+dfsg-7ubuntu4rock7_amd64.deb ...
Unpacking qdbus (5:4.8.7+dfsg-7ubuntu4rock7) ...
Selecting previously unselected package libqt4-dbus:amd64.
Preparing to unpack .../libqt4-dbus_5%3a4.8.7+dfsg-7ubuntu4rock7_amd64.deb ...
Unpacking libqt4-dbus:amd64 (5:4.8.7+dfsg-7ubuntu4rock7) ...
Selecting previously unselected package libqt4-svg:amd64.
Preparing to unpack .../libqt4-svg_5%3a4.8.7+dfsg-7ubuntu4rock7_amd64.deb ...
Unpacking libqt4-svg:amd64 (5:4.8.7+dfsg-7ubuntu4rock7) ...
Setting up libqt4-svg:amd64 (5:4.8.7+dfsg-7ubuntu4rock7) ...
Setting up qdbus (5:4.8.7+dfsg-7ubuntu4rock7) ...
Setting up libqt4-dbus:amd64 (5:4.8.7+dfsg-7ubuntu4rock7) ...
Setting up eveusb (9.1.0) ...
/var/lib/dpkg/info/eveusb.postinst configure
Unable to identify user running this installation.
Please add users manually to the 'eveusb' group so they can control the daemon u
sing GUI and console utilities.
Examples:
gpasswd -a eveusb
groupmod --add-user eveusb # SUSE
usermod --append --groups eveusb
usermod --add-to-group eveusb # SUSE
Synchronizing state of eveusb.service with SysV service script with /lib/systemd
/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable eveusb
Creating symlink /var/lib/dkms/eveusb/1.0.0/source ->
/usr/src/eveusb-1.0.0
DKMS: add completed.
Error! Your kernel headers for kernel 5.8.0-rc3-microsoft-standard cannot be fou
nd.
Please install the linux-headers-5.8.0-rc3-microsoft-standard package,
or use the --kernelsourcedir option to tell DKMS where it's located
Traceback (most recent call last):
File "/var/lib/dpkg/info/eveusb.postinst", line 549, in
make_all()
File "/var/lib/dpkg/info/eveusb.postinst", line 528, in make_all
process_module(True)
File "/var/lib/dpkg/info/eveusb.postinst", line 268, in process_module
check_call([dkms, action] + mod_ver)
File "/var/lib/dpkg/info/eveusb.postinst", line 30, in check_call
subprocess.check_call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dkms', 'build', '-m', 'eveusb', '-v',
'1.0.0']' returned non-zero exit status 1
dpkg: error processing package eveusb (--configure):
installed eveusb package post-installation script subprocess returned error exi
t status 1
/bin/df: /proc/sys/fs/binfmt_misc: Too many levels of symbolic links
Processing t
riggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Errors were encountered while processing:
eveusb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DESKTOP-N9UN2H3:~/Desktop# dpkg -i usb_network_gate_x64.deb
(Reading database ... 352951 files and directories currently installed.)
Preparing to unpack usb_network_gate_x64.deb ...
/var/lib/dpkg/info/eveusb.prerm upgrade 9.1.0
Synchronizing state of eveusb.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable eveusb
Deleting module version: 1.0.0
completely from the DKMS tree.
Done.
groupdel: group 'eveusb' does not exist
Unpacking eveusb (9.1.0) over (9.1.0) ...
/var/lib/dpkg/info/eveusb.postrm upgrade 9.1.0
Setting up eveusb (9.1.0) ...
/var/lib/dpkg/info/eveusb.postinst configure
Unable to identify user running this installation.
Please add users manually to the 'eveusb' group so they can control the daemon using GUI and console utilities.
Examples:
gpasswd -a eveusb
groupmod --add-user eveusb # SUSE
usermod --append --groups eveusb
usermod --add-to-group eveusb # SUSE
Synchronizing state of eveusb.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable eveusb
Creating symlink /var/lib/dkms/eveusb/1.0.0/source ->
/usr/src/eveusb-1.0.0
DKMS: add completed.
Error! Your kernel headers for kernel 5.8.0-rc3-microsoft-standard cannot be found.
Please install the linux-headers-5.8.0-rc3-microsoft-standard package,
or use the --kernelsourcedir option to tell DKMS where it's located
Traceback (most recent call last):
File "/var/lib/dpkg/info/eveusb.postinst", line 549, in
make_all()
File "/var/lib/dpkg/info/eveusb.postinst", line 528, in make_all
process_module(True)
File "/var/lib/dpkg/info/eveusb.postinst", line 268, in process_module
check_call([dkms, action] + mod_ver)
File "/var/lib/dpkg/info/eveusb.postinst", line 30, in check_call
subprocess.check_call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dkms', 'build', '-m', 'eveusb', '-v', '1.0.0']' returned non-zero exit status 1
dpkg: error processing package eveusb (--install):
installed eveusb package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Errors were encountered while processing:
eveusb
root@DESKTOP-N9UN2H3:~/Desktop# uname -a
Linux DESKTOP-N9UN2H3 5.8.0-rc3-microsoft-standard #2 SMP Tue Jun 30 14:38:02 CEST 2020 x86_64 x86_64 x86_64 GNU/Linux
root@DESKTOP-N9UN2H3:~/Desktop# apt install linux-headers-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-generic is already the newest version (5.4.0.45.49).
linux-headers-generic set to manually installed.
The following packages were automatically installed and are no longer required:
libfprint-2-tod1 libjpeg62 libllvm9:i386 libtirpc-common libtirpc3
linux-headers-5.4.0-39 linux-headers-5.4.0-39-generic
linux-image-5.4.0-39-generic linux-modules-5.4.0-39-generic
linux-modules-extra-5.4.0-39-generic
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up eveusb (9.1.0) ...
/var/lib/dpkg/info/eveusb.postinst configure
Unable to identify user running this installation.
Please add users manually to the 'eveusb' group so they can control the daemon u
sing GUI and console utilities.
Examples:
gpasswd -a eveusb
groupmod --add-user eveusb # SUSE
usermod --append --groups eveusb
usermod --add-to-group eveusb # SUSE
Synchronizing state of eveusb.service with SysV service script with /lib/systemd
/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable eveusb
Deleting module version: 1.0.0
completely from the DKMS tree.
Done.
Creating symlink /var/lib/dkms/eveusb/1.0.0/source ->
/usr/src/eveusb-1.0.0
DKMS: add completed.
Error! Your kernel headers for kernel 5.8.0-rc3-microsoft-standard cannot be fou
nd.
Please install the linux-headers-5.8.0-rc3-microsoft-standard package,
or use the --kernelsourcedir option to tell DKMS where it's located
Traceback (most recent call last):
File "/var/lib/dpkg/info/eveusb.postinst", line 549, in
make_all()
File "/var/lib/dpkg/info/eveusb.postinst", line 528, in make_all
process_module(True)
File "/var/lib/dpkg/info/eveusb.postinst", line 268, in process_module
check_call([dkms, action] + mod_ver)
File "/var/lib/dpkg/info/eveusb.postinst", line 30, in check_call
subprocess.check_call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dkms', 'build', '-m', 'eveusb', '-v',
'1.0.0']' returned non-zero exit status 1
dpkg: error processing package eveusb (--configure):
installed eveusb package post-installation script subprocess returned error exi
t status 1
Errors were encountered while processing:
eveusb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DESKTOP-N9UN2H3:~/Desktop# sudo apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-5.8.0-rc3-microsoft-standard
E: Couldn't find any package by glob 'linux-headers-5.8.0-rc3-microsoft-standard'
E: Couldn't find any package by regex 'linux-headers-5.8.0-rc3-microsoft-standard'
助けが必要ですか?
答え1
USBネットワークゲートには明らかに一種のカーネル拡張が必要です。標準のDebianまたはUbuntuインストールでは、ソースを提供し、DKMSシステムを使用して適切なカーネル用のカーネルモジュールを構築することで、これらの拡張機能を追加できます。ただし、これを行うには、通常、ディストリビューションでパッケージとして提供される適切なカーネルのカーネルヘッダーが必要です。
ただし、WSLの場合、使用されるカーネルはディストリビューションによって提供されるカーネルではなく、Microsoftが提供する特定のカーネルです。カーネルはモジュールをサポートしていますが、モジュールを使用するようにコンパイルされていないため、Microsoftはカーネルヘッダのパッケージを提供しません。ソースコードはGitHubにあります。)。お客様のディストリビューションは Microsoft カーネルの責任を負わないため、ヘッダーも提供しません。
したがって、WSL用のカーネルモジュールを構築することは事実上不可能です。カーネルモジュールが必要なものを使用するには、仮想マシンまたは物理ハードウェアに物理Linuxシステムが必要です。