当我从 Realtek 网站安装 alsa-driver-RTv5.18rc8 时。由于没有声音,并且除了数字输出设备之外没有其他输出设备。当我按照说明但当我尝试执行(最后几步)时sudo make
,sudo make install
我总是得到这个
制作1:进入目录“/usr/src/linux-headers-5.4.0-26-generic”LEX 脚本/kconfig/lexer.lex.c /bin/sh: 1: flex: 未找到 make[3]:* [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] 错误 127 make[2]:[Makefile:594: syncconfig] 错误 2 make1:[Makefile:704:include/config/auto.conf.cmd] 错误 2 make1:离开目录‘/usr/src/linux-headers-5.4.0-26-generic’make:*[Makefile:167: 编译] 错误 2
ronan@ronan-H110M-DS2:~/Downloads/0002-LinuxPkg_5.18rc8/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18rc8/alsa-driver-RTv5.18/alsa$ sudo make install
if [ -L /usr/include/sound ]; then \
rm -f /usr/include/sound; \
ln -sf /home/ronan/Downloads/0002-LinuxPkg_5.18rc8/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18rc8/alsa-driver-RTv5.18/alsa/include/sound /usr/include/sound; \
else \
rm -rf /usr/include/sound; \
install -d -m 755 -g root -o root /usr/include/sound; \
for f in include/sound/*.h; do \
install -m 644 -g root -o root $f /usr/include/sound; \
done \
fi
find /lib/modules/5.4.0-26-generic/kernel/sound -name 'snd*.*o' | xargs rm -f
find /lib/modules/5.4.0-26-generic/kernel/sound -name 'snd*.*o.gz' | xargs rm -f
find /lib/modules/5.4.0-26-generic/kernel/sound -name 'ac97_bus.*o' | xargs rm -f
find /lib/modules/5.4.0-26-generic/kernel/sound -name 'ac97_bus.*o.gz' | xargs rm -f
make[1]: Entering directory '/home/ronan/Downloads/0002-LinuxPkg_5.18rc8/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18rc8/alsa-driver-RTv5.18/alsa/include'
make[1]: Nothing to be done for 'modules_install'.
make[1]: Leaving directory '/home/ronan/Downloads/0002-LinuxPkg_5.18rc8/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18rc8/alsa-driver-RTv5.18/alsa/include'
make[1]: Entering directory '/home/ronan/Downloads/0002-LinuxPkg_5.18rc8/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18rc8/alsa-driver-RTv5.18/alsa/acore'
mkdir -p /lib/modules/5.4.0-26-generic/kernel/sound/acore
cp snd-hrtimer.ko snd-hwdep.ko snd-page-alloc.ko snd-pcm.ko snd-rawmidi.ko snd-timer.ko snd.ko /lib/modules/5.4.0-26-generic/kernel/sound/acore
cp: cannot stat 'snd-hrtimer.ko': No such file or directory
cp: cannot stat 'snd-hwdep.ko': No such file or directory
cp: cannot stat 'snd-page-alloc.ko': No such file or directory
cp: cannot stat 'snd-pcm.ko': No such file or directory
cp: cannot stat 'snd-rawmidi.ko': No such file or directory
cp: cannot stat 'snd-timer.ko': No such file or directory
cp: cannot stat 'snd.ko': No such file or directory
make[1]: *** [/home/ronan/Downloads/0002-LinuxPkg_5.18rc8/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18rc8/alsa-driver-RTv5.18/alsa/Rules.make:49: modules_install] Error 1
make[1]: Leaving directory '/home/ronan/Downloads/0002-LinuxPkg_5.18rc8/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18rc8/alsa-driver-RTv5.18/alsa/acore'
make: *** [Makefile:210: install-modules] Error 1
答案1
如果你是初学者,你不应该编译驱动程序。那很难。