如何在 ubuntu 18.04 hp 笔记本电脑 ay503tx 中安装 libelf-devel 或 elfutils-libelf-devel

如何在 ubuntu 18.04 hp 笔记本电脑 ay503tx 中安装 libelf-devel 或 elfutils-libelf-devel

ubuntu 18.04 bionic wifi 驱动程序 rtl8723be

我在终端中运行了这个命令

git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
git checkout extended
sudo make install

make command not found :

然后我跑了

sudo apt-get install --reinstall make
 sudo apt-get install build-essential

错误:

 sudo make install
make -C /lib/modules/4.15.0-33-generic/build M=/home/rizwan/Downloads/rtlwifi_new modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-33-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/rizwan/Downloads/rtlwifi_new/base.o
cc1: error: code model kernel does not support PIC mode
scripts/Makefile.build:332: recipe for target '/home/rizwan/Downloads/rtlwifi_new/base.o' failed
make[2]: *** [/home/rizwan/Downloads/rtlwifi_new/base.o] Error 1
Makefile:1552: recipe for target '_module_/home/rizwan/Downloads/rtlwifi_new' failed
make[1]: *** [_module_/home/rizwan/Downloads/rtlwifi_new] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-33-generic'
Makefile:87: recipe for target 'all' failed
make: *** [all] Error 2

我使用命令安装了这些模块

sudo apt install libelf-dev  libelf-devel elfutils-libelf-devel

仅安装了 libelf-dev,但其余两个无法找到

rizwan@rizwan-HP:~$ sudo apt install libelf-dev  libelf-devel elfutils-libelf-devel
[sudo] password for rizwan: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libelf-devel
E: Unable to locate package elfutils-libelf-devel
rizwan@rizwan-HP:~$ 

最后我发现库的名称因不同的 Linux 发行版而异,所以请帮我在 ubuntu 18.04 hp 笔记本电脑 ay503tx 中安装 libelf-devel elfutils-libelf-devel

答案1

您需要通过以下方式安装 linix headers generic:

sudo apt-get update
sudo apt-get install linux-generic

我看到您已经下载了 realtek wifi 驱动程序,请确保您在正确的目录中,然后运行此命令来安装它们:

cd rtlwifi_new
sudo dkms add ../rtlwifi_new
sudo dkms build rtlwifi-new/0.6 
sudo dkms install rtlwifi-new/0.6
sudo modprobe -v rtl8723de ant_sel=2

恭喜您已运行 WiFi。

使用此命令保存配置:

sudo /bin/sh -c 'echo "options rtl8723de ant_sel=2" >> /etc/modprobe.d/rtl8723de.conf'

重新开始。

详情请见此处:

https://h30434.www3.hp.com/t5/Notebook-Wireless-and-Networking/Realtek-8723DE-wifi-module-amp-Bluetooth-Linux-driver/td-p/6477307

相关内容