Mt7630e驱动在Fedora27上搭建安装

Mt7630e driver build and install on Fedora27

我是 Linux 的新手,我已经安装了 Fedora27,现在正在尝试安装 wifi 驱动程序。我尝试从 https://github.com/neurobin/MT7630E 安装驱动程序并遇到一些可能已修复的错误。

以下是安装时的错误:

[mrsarayra@Fedora-host MT7630E-release]$ sudo ./install
[sudo] password for mrsarayra: 
make -C /lib/modules/4.13.9-300.fc27.x86_64/build M=/home/mrsarayra/Downloads/MT7630E-release/rt2x00 modules
make[1]: *** /lib/modules/4.13.9-300.fc27.x86_64/build: No such file or directory.  Stop.
make: *** [Makefile:9: all] Error 2
[mrsarayra@Fedora-host MT7630E-release]$ sudo make dkms
cp -v firmware/*/* /lib/firmware/
'firmware/BT/mt76x0.bin' -> '/lib/firmware/mt76x0.bin'
'firmware/Wi-FI/MT7650E234.bin' -> '/lib/firmware/MT7650E234.bin'
cp -R . /usr/src/mt7630e-`sed -n 's/^[[:blank:]]*PACKAGE_VERSION=\([^[:blank:]]*\).*//p' dkms.conf`
dkms add -m mt7630e -v `sed -n 's/^[[:blank:]]*PACKAGE_VERSION=\([^[:blank:]]*\).*//p' dkms.conf`
/bin/sh: dkms: command not found
make: *** [Makefile:31: dkms] Error 127
[mrsarayra@Fedora-host MT7630E-release]$ sudo ./bpatch
*** Stoping Bluetooth...
Redirecting to /bin/systemctl stop bluetooth.service
*** Installing kernel headers...
./bpatch: line 136: apt-get: command not found
./bpatch: line 137: apt-get: command not found
[mrsarayra@Fedora-host MT7630E-release]$ ^C
[mrsarayra@Fedora-host MT7630E-release]$ sudo ./install
make -C /lib/modules/4.13.9-300.fc27.x86_64/build M=/home/mrsarayra/Downloads/MT7630E-release/rt2x00 modules
make[1]: *** /lib/modules/4.13.9-300.fc27.x86_64/build: No such file or directory.  Stop.
make: *** [Makefile:9: all] Error 2

我该如何解决这个问题?

感谢任何帮助。


这是我的系统信息:

System:    Host: Fedora-host Kernel: 4.13.9-300.fc27.x86_64 x86_64 bits: 64 gcc: 7.2.1 Console: tty 0
           Distro: Fedora release 27 (Twenty Seven)
Machine:   Device: laptop System: ASUSTeK product: X555LB v: 1.0 serial: <filter>
           Mobo: ASUSTeK model: X555LB v: 1.0 serial: <filter>
           UEFI: American Megatrends v: X555LB.603 date: 05/06/2016
Battery    BAT0: charge: 11.7 Wh 61.7% condition: 19.0/37.3 Wh (51%) model: ASUSTeK ASUS status: Discharging
CPU:       Dual core Intel Core i7-5500U (-MT-MCP-) arch: Broadwell rev.4 cache: 4096 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9585
           clock speeds: max: 3000 MHz 1: 2396 MHz 2: 2396 MHz 3: 2396 MHz 4: 2396 MHz
Memory:    Array-1 capacity: 16 GB devices: 2 EC: None
           Device-1: ChannelA-DIMM0 size: 4 GB speed: 1600 MT/s type: DDR3 part: 8KTF51264HZ-1G6N1
           Device-2: ChannelB-DIMM0 size: 4 GB speed: 1600 MT/s type: DDR3 part: M471B5173EB0-YK0
Graphics:  Card-1: Intel HD Graphics 5500 bus-ID: 00:02.0
           Card-2: NVIDIA GM108M [GeForce 940M] bus-ID: 04:00.0
           Display Server: X.org 1.19.5 drivers: i915,nouveau tty size: 175x24 Advanced Data: N/A for root
Audio:     Card-1 Intel Wildcat Point-LP High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
           Card-2 Intel Broadwell-U Audio Controller driver: snd_hda_intel bus-ID: 00:03.0
           Sound: Advanced Linux Sound Architecture v: k4.13.9-300.fc27.x86_64
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: 4000 bus-ID: 02:00.0
           IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
           Card-2: MEDIATEK MT7630e 802.11bgn Wireless Network Adapter bus-ID: 03:00.0
           IF: N/A state: N/A mac: N/A
Drives:    HDD Total Size: 2250.5GB (1.0% used)
           ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB temp: 27C
           ID-2: /dev/sdb model: ST2000LM003_HN size: 2000.4GB temp: 24C
Partition: ID-1: / size: 58G used: 4.3G (8%) fs: ext4 dev: /dev/sda7
           ID-2: /boot size: 976M used: 117M (13%) fs: ext4 dev: /dev/sda6
           ID-3: /home size: 462G used: 82M (1%) fs: ext4 dev: /dev/sdb3
           ID-4: /var size: 49G used: 1.1G (3%) fs: ext4 dev: /dev/sdb4
           ID-5: swap-1 size: 17.18GB used: 0.00GB (0%) fs: swap dev: /dev/sdb5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 38.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 2300
Info:      Processes: 248 Uptime: 6 min Memory: 966.4/7664.0MB Init: systemd runlevel: 5 Gcc sys: N/A
           Client: Shell (sudo) inxi: 2.3.56 

安装这些软件包后:

sudo dnf distro-sync
sudo dnf group install "Development Tools"
sudo dnf install kernel-devel

+ 这个包(这是必要的)“elfutils-libelf-devel”用命令 yum --enablerepo=u*g install elfutils-libelf-devel 我 re-installed 驱动程序,它编译并运行得非常棒! :)