我尝试按照我自己的安装说明进行操作:USB to HDMI adapter that Works with Ubuntu。它们在 Ubuntu 22.04 上运行良好,但在 20.04 上则不然。20.04 当我执行该sudo apt install displaylink-driver
步骤时,我得到:
$ sudo apt install displaylink-driver
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
displaylink-driver : Depends: evdi (>= 1.14.1) but it is not going to be installed
Depends: evdi (< 1.15.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
这个答案推荐sudo apt install evdi-dkms
。
这会导致更多错误:
Building initial module for 5.15.0-41-generic
ERROR (dkms apport): kernel package linux-headers-5.15.0-41-generic is not supported
Error! Bad return status for module build on kernel: 5.15.0-41-generic (x86_64)
Consult /var/lib/dkms/evdi/1.6.0+dfsg/build/make.log for more information.
dpkg: error processing package evdi-dkms (--configure):
installed evdi-dkms package post-installation script subprocess returned error exit status 10
Setting up libevdi0 (1.6.0+dfsg-1ubuntu3) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Errors were encountered while processing:
evdi-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
完整上下文:
$ sudo apt install evdi-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libevdi0
The following NEW packages will be installed:
evdi-dkms libevdi0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.4 kB of archives.
After this operation, 173 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 evdi-dkms all 1.6.0+dfsg-1ubuntu3 [25.5 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libevdi0 amd64 1.6.0+dfsg-1ubuntu3 [8,972 B]
Fetched 34.4 kB in 0s (74.8 kB/s)
Selecting previously unselected package evdi-dkms.
(Reading database ... 499689 files and directories currently installed.)
Preparing to unpack .../evdi-dkms_1.6.0+dfsg-1ubuntu3_all.deb ...
Unpacking evdi-dkms (1.6.0+dfsg-1ubuntu3) ...
Selecting previously unselected package libevdi0.
Preparing to unpack .../libevdi0_1.6.0+dfsg-1ubuntu3_amd64.deb ...
Unpacking libevdi0 (1.6.0+dfsg-1ubuntu3) ...
Setting up evdi-dkms (1.6.0+dfsg-1ubuntu3) ...
Loading new evdi-1.6.0+dfsg DKMS files...
Building for 5.15.0-41-generic
Building initial module for 5.15.0-41-generic
ERROR (dkms apport): kernel package linux-headers-5.15.0-41-generic is not supported
Error! Bad return status for module build on kernel: 5.15.0-41-generic (x86_64)
Consult /var/lib/dkms/evdi/1.6.0+dfsg/build/make.log for more information.
dpkg: error processing package evdi-dkms (--configure):
installed evdi-dkms package post-installation script subprocess returned error exit status 10
Setting up libevdi0 (1.6.0+dfsg-1ubuntu3) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Errors were encountered while processing:
evdi-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
现在sudo apt install
可以安装在其他任何东西上。并sudo apt upgrade
因此失败:
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
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]
Setting up evdi-dkms (1.6.0+dfsg-1ubuntu3) ...
Removing old evdi-1.6.0+dfsg DKMS files...
------------------------------
Deleting module version: 1.6.0+dfsg
completely from the DKMS tree.
------------------------------
Done.
Loading new evdi-1.6.0+dfsg DKMS files...
Building for 5.15.0-41-generic
Building initial module for 5.15.0-41-generic
ERROR (dkms apport): kernel package linux-headers-5.15.0-41-generic is not supported
Error! Bad return status for module build on kernel: 5.15.0-41-generic (x86_64)
Consult /var/lib/dkms/evdi/1.6.0+dfsg/build/make.log for more information.
dpkg: error processing package evdi-dkms (--configure):
installed evdi-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
evdi-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
所以我按照我的评论运行sudo dpkg -r evdi-dkms
来解决这个问题,然后我又回到了起点。sudo apt upgrade
又可以工作了,谢天谢地!——哇!但是,sudo apt install displaylink-driver
又回到了开头的错误。
我尝试升级到 Ubuntu 22.04,但/boot
太满了。
注意:从sudo apt install evdi-dkms
上面的失败消息来看,它表示:
咨询
/var/lib/dkms/evdi/1.6.0+dfsg/build/make.log
更多信息。
该文件中的内容如下:
来自/var/lib/dkms/evdi/1.6.0+dfsg/build/make.log
:
DKMS make.log for evdi-1.6.0+dfsg for kernel 5.15.0-41-generic (x86_64)
Thu 28 Sep 2023 07:05:36 PM MST
make: Entering directory '/usr/src/linux-headers-5.15.0-41-generic'
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_drv.o
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_connector.o
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_modeset.o
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_encoder.o
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_main.o
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_fb.o
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_gem.o
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_drv.c:11:10: fatal error: drm/drmP.h: No such file or directory
11 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_drv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
CC [M] /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_painter.o
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_connector.c:14:10: fatal error: drm/drmP.h: No such file or directory
14 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_modeset.c:15:10: fatal error: drm/drmP.h: No such file or directory
15 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.b<drm/drmP.h>uild:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_modeset.o] Error 1
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_connector.o] Error 1
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_encoder.c:14:10: fatal error: drm/drmP.h: No such file or directory
14 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_encoder.o] Error 1
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_gem.c:11:10: fatal error: drm/drmP.h: No such file or directory
11 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_gem.o] Error 1
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_main.c:15:10: fatal error: drm/drmP.h: No such file or directory
15 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_main.o] Error 1
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_painter.c:12:10: fatal error: drm/drmP.h: No such file or directory
12 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_painter.o] Error 1
/var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_fb.c:20:10: fatal error: drm/drmP.h: No such file or directory
20 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/evdi/1.6.0+dfsg/build/evdi_fb.o] Error 1
make: *** [Makefile:1875: /var/lib/dkms/evdi/1.6.0+dfsg/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.0-41-generic'
ERROR (dkms apport): kernel package linux-headers-5.15.0-41-generic is not supported
所以显然我错过了头<drm/drmP.h>
文件,如果有人知道如何获取它。
源代码evdi
似乎在这里:https://github.com/DisplayLink/evdi
我无法从头开始构建它。make
由于另一个丢失的头文件而失败。
(这就是人们使用 Windows 的原因,朋友们)。
我正在尝试按照以下说明安装libdrm-dev
:如何在 Ubuntu 20.04或(更新版本)上安装 DisplayLink 软件如何在旧版 Ubuntu 版本上安装 DisplayLink 软件
...但这也行不通。
新问题:无法在 Ubuntu 20.04 上安装,因为它需要比我拥有的依赖项更旧的依赖项libdrm-dev
如果我按照我的回答libdrm
从源代码手动构建和安装,然后手动尝试安装 DisplayLink 驱动程序,安装程序仍然会阻止我:
~/Downloads/Install_Files/DisplayLink/DisplayLink USB Graphics Software for Ubuntu5.8-EXE$ sudo ./displaylink-driver-5.8.0-63.33.run
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing DisplayLink Linux Driver 5.8.0-63.33 100%
Distribution discovered: Ubuntu 20.04.4 LTS
[ Installing dependencies ]
Need to update package list.
apt update? (Y/n) n
Unsatisfied dependencies. Missing component: libdrm.
This is a fatal error, cannot install DisplayLink Linux Software.
完整说明:在 Ubuntu 20.04 上安装 displaylink-driver(也适用于 22.04 或更高版本)
注意:这些说明也适用于 Ubuntu 22.04 或更高版本。这里唯一特定于 Ubuntu 20.04 的部分是使用
sudo aptitude install libdrm-dev
installlibdrm-dev
,因为它sudo apt install libdrm-dev
不起作用。我想到一个办法了!我是
libdrm-dev
通过使用安装的aptitude
:请在此处查看我的完整答案、输出和描述:无法在 Ubuntu 20.04 上安装,因为它需要比我拥有的依赖项更旧的依赖项
libdrm-dev
然后,一旦我
libdrm-dev
成功安装,就可以按照此处的官方说明安装依赖项:如何在旧版 Ubuntu 版本上安装 DisplayLink 软件:然后我在这里的答案中的说明起作用了:USB to HDMI adapter that works with Ubuntu:
在 BIOS 中禁用安全启动,然后重新启动并运行以下命令:
完毕!
重新启动后,您可以插入价值 90 美元的 Club3D CSV-1477 USB 3.0 Type A 至双显示端口 1.2 4K 60Hz 外部图形视频适配器,它会在 5 到 10 秒左右被识别并自动开始显示通过 USB 3.0 USB-A 插头连接两个同步 4k、60 Hz 输出。
如果您感兴趣,这是我运行时的完整输出
sudo apt install displaylink-driver
。请注意,它明确告诉我重新启动:其他参考资料