在 Ubuntu 20.04 LTS 上安装 Darling 时出错

在 Ubuntu 20.04 LTS 上安装 Darling 时出错

Darling 是一款帮助在 unbuntu 上运行 macos 应用程序的软件,但我在安装它时遇到了错误——当我尝试运行sudo dpkg -i darling-dkms_0.1.20210224.testing_amd64.deb

它给出以下输出-

Selecting previously unselected package darling-dkms.
(Reading database ... 344458 files and directories currently installed.)
Preparing to unpack darling-dkms_0.1.20210224.testing_amd64.deb ...
Unpacking darling-dkms (0.1.20210224~testing) ...
Setting up darling-dkms (0.1.20210224~testing) ...
>>> DKMS: Module add, build, and install

Creating symlink /var/lib/dkms/darling-mach/0.1/source ->
                 /usr/src/darling-mach-0.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area.....
'make' -C lkm/ MIGDIR=/usr/src/darling-mach-0.1/miggen MIGDIR_REL=../miggen......(bad exit status: 2)
ERROR (dkms apport): unable to determine source package for darling-dkms
Error! Bad return status for module build on kernel: 5.11.0-27-generic (x86_64)
Consult /var/lib/dkms/darling-mach/0.1/build/make.log for more information.
dpkg: error processing package darling-dkms (--install):
 installed darling-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 darling-dkms

当我尝试安装 darling 时,它给出-

Selecting previously unselected package darling.
(Reading database ... 349934 files and directories currently installed.)
Preparing to unpack darling_0.1.20210224.testing_amd64.deb ...
Unpacking darling (0.1.20210224~testing) ...
dpkg: dependency problems prevent configuration of darling:
 darling depends on libc6 (>= 2.32); however:
  Version of libc6:amd64 on system is 2.31-0ubuntu9.2.
 darling depends on libc6-i386 (>= 2.32); however:
  Version of libc6-i386 on system is 2.31-0ubuntu9.2.
 darling depends on darling-dkms; however:
  Package darling-dkms is not configured yet.

dpkg: error processing package darling (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 darling

当我检查日志时,/var/lib/dkms/darling-mach/0.1/build/make.log它显示——

DKMS make.log for darling-mach-0.1 for kernel 5.11.0-27-generic (x86_64)
Saturday 28 August 2021 09:17:57 PM IST
make: Entering directory '/var/lib/dkms/darling-mach/0.1/build/lkm'
Running kernel version is 5.11.0-27-generic
rm -f darling-mach.mod.o
make -C /lib/modules/5.11.0-27-generic/build M=/var/lib/dkms/darling-mach/0.1/build/lkm modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-27-generic'
Running kernel version is 5.11.0-27-generic
Invoked by kernel build system, building for 5.11.0-27-generic
  CC [M]  /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.o
In file included from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/mach/port.h:90,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.c:74:
/var/lib/dkms/darling-mach/0.1/build/lkm/EXTERNAL_HEADERS/stdint.h:137: warning: "UINTPTR_MAX" redefined
  137 | #define UINTPTR_MAX   UINT64_MAX
      | 
In file included from ./include/linux/limits.h:7,
                 from ./include/linux/kernel.h:6,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:12,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/duct/duct.h:50,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.c:67:
./include/vdso/limits.h:17: note: this is the location of the previous definition
   17 | #define UINTPTR_MAX ULONG_MAX
      | 
In file included from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/mach/vm_param.h:79,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/mach/mach_types.h:115,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/kern/clock.h:38,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/kern/sched_prim.h:72,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.c:76:
/var/lib/dkms/darling-mach/0.1/build/lkm/libkern/os/overflow.h:66:3: error: #error os_overflow expects type-generic builtins
   66 | # error os_overflow expects type-generic builtins
      |   ^~~~~
In file included from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/mach/mach_types.h:115,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/kern/clock.h:38,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/kern/sched_prim.h:72,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.c:76:
/var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/mach/vm_param.h: In function ‘mach_vm_round_page_overflow’:
/var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/mach/vm_param.h:126:23: error: implicit declaration of function ‘os_add_overflow’; did you mean ‘os_add3_overflow’? [-Werror=implicit-function-declaration]
  126 |          bool __ovr = os_add_overflow(in, (__typeof__(*out))PAGE_MASK, out); \
      |                       ^~~~~~~~~~~~~~~
/var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/mach/vm_param.h:134:9: note: in expansion of macro ‘round_page_overflow’
  134 |  return round_page_overflow(in, out);
      |         ^~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/darling-mach/0.1/build/lkm/bsd/sys/event.h:674,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_mqueue.h:82,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_port.h:91,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/kern/task.h:126,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/kern/thread.h:122,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/kern/sched_prim.h:74,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.c:76:
/var/lib/dkms/darling-mach/0.1/build/lkm/bsd/sys/fcntl.h: At top level:
/var/lib/dkms/darling-mach/0.1/build/lkm/bsd/sys/fcntl.h:145: warning: "AT_EACCESS" redefined
  145 | #define AT_EACCESS              0x0010  /* Use effective ids in access check */
      | 
In file included from ./include/linux/fcntl.h:6,
                 from ./include/linux/fs.h:26,
                 from ./include/linux/huge_mm.h:8,
                 from ./include/linux/mm.h:703,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/duct/duct.h:55,
                 from /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.c:67:
./include/uapi/linux/fcntl.h:99: note: this is the location of the previous definition
   99 | #define AT_EACCESS  0x200 /* Test access permitted for
      | 
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/darling-mach/0.1/build/lkm/osfmk/ipc/ipc_entry.o] Error 1
make[1]: *** [Makefile:1848: /var/lib/dkms/darling-mach/0.1/build/lkm] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-27-generic'
make: *** [Makefile:615: default] Error 2
make: Leaving directory '/var/lib/dkms/darling-mach/0.1/build/lkm'

请帮忙

我使用的是 Ubuntu 20.04 LTS

哪位高手帮忙

答案1

您的输出清楚地表明您的 Ubuntu 版本太旧:

darling depends on libc6 (>= 2.32); however:
  Version of libc6:amd64 on system is 2.31-0ubuntu9.2

安装旧版本的 Darling 或新版本的 Ubuntu。

答案2

只需安装这些依赖项

sudo apt install cmake clang bison flex libfuse-dev libudev-dev pkg-config libc6-dev-i386 \
linux-headers-generic gcc-multilib libcairo2-dev libgl1-mesa-dev libglu1-mesa-dev libtiff5-dev \
libfreetype6-dev git libelf-dev libxml2-dev libegl1-mesa-dev libfontconfig1-dev libbsd-dev \
libxrandr-dev libxcursor-dev libgif-dev libavutil-dev libpulse-dev libavformat-dev libavcodec-dev \
libavresample-dev libdbus-1-dev libxkbfile-dev libssl-dev

答案3

我正在运行 Ubuntu 20.04.3 LTS,其他答案对我不起作用。我运行以下命令来解决这个问题:

sudo apt remove darling-dkms # remove faulty package
sudo apt update && sudo apt upgrade # update & upgrade packages. This should also upgrade your kernel to a newer version (for me, this was 5.10.0-1051-oem)
sudo apt install darling-dkms

相关内容