Файл Python.h не найден в Ubuntu 20.04 даже после установки python-dev

Я только что перешел на Linux (Ubuntu 20.04) из Windows. После установки python-dev я заметил, что Python.h все еще не включен, что нарушает мою интегрированную сборку Python-C ++ (я использую pybind11). Я также пытался установить любой другой вариант python-dev, который я видел в сети (python3-dev, python-devel и т. Д.), Но безрезультатно.

Интересно, что установка python3-dev в Ubuntu 18.04 включает в себя этот файл и все работает. После нескольких перезагрузок и использования Windows я попробовал это снова, и теперь он показывает беспроводной адаптер (как «ОТКЛЮЧЕНО»):

    lshw -C network
WARNING: you should run this program as super-user.
  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: enp4s0
       version: 10
       serial: 64:1c:67:a9:cd:7c
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII
       resources: irq:16 ioport:3000(size=256) memory:a1304000-a1304fff memory:a1300000-a1303fff
  *-generic DISABLED
       description: Wireless interface
       product: RTL8822BE 802.11a/b/g/n/ac WiFi adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: ff
       serial: c0:b5:d7:a2:1b:65
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_pci driverversion=5.4.0-42-generic firmware=N/A latency=255 link=no maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11
       resources: irq:142 ioport:2000(size=256) memory:a1200000-a120ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

Но я действительно могу видеть контроллер Wi-Fi здесь:

sudo lspci
[...]
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
05:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter (rev ff)
07:00.0 Non-Volatile memory controller: SK hynix BC501 NVMe Solid State Drive 512GB

И модуль драйвера для RTL8822BE ( rtw88 ) также виден:

sudo lsmod
Module                  Size  Used by
cpuid                  16384  0
rfcomm                 81920  16
cmac                   16384  3
algif_hash             16384  1
algif_skcipher         16384  1
af_alg                 24576  6 algif_hash,algif_skcipher
bnep                   24576  2
nls_iso8859_1          16384  1
snd_sof_pci            20480  0
snd_sof_intel_hda_common    69632  1 snd_sof_pci
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_intel_byt      20480  1 snd_sof_pci
snd_sof_intel_ipc      20480  1 snd_sof_intel_byt
snd_sof               106496  4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_byt,snd_sof_intel_ipc
snd_sof_xtensa_dsp     16384  1 snd_sof_pci
snd_hda_codec_hdmi     61440  1
snd_hda_ext_core       28672  3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match    32768  2 snd_sof_pci,snd_sof_intel_hda_common
snd_hda_codec_conexant    28672  1
snd_hda_codec_generic    81920  1 snd_hda_codec_conexant
snd_soc_acpi           16384  2 snd_sof_pci,snd_soc_acpi_intel_match
snd_soc_core          245760  3 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
snd_compress           24576  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
x86_pkg_temp_thermal    20480  0
intel_powerclamp       20480  0
snd_hda_intel          53248  3
snd_intel_dspcfg       24576  3 snd_hda_intel,snd_sof_pci,snd_sof_intel_hda_common
coretemp               20480  0
snd_hda_codec         131072  5 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel,snd_soc_hdac_hda
uvcvideo               98304  0
kvm_intel             286720  0
kvm                   663552  1 kvm_intel
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_memops       20480  1 videobuf2_vmalloc
snd_hda_core           90112  9 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_common       49152  2 videobuf2_v4l2,uvcvideo
thinkpad_acpi         110592  0
crct10dif_pclmul       16384  1
videodev              225280  3 videobuf2_v4l2,uvcvideo,videobuf2_common
ghash_clmulni_intel    16384  0
btusb                  57344  0
mc                     53248  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
aesni_intel           372736  4
nvram                  16384  1 thinkpad_acpi
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               106496  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
crypto_simd            16384  1 aesni_intel
cryptd                 24576  3 crypto_simd,ghash_clmulni_intel
ledtrig_audio          16384  4 snd_hda_codec_generic,snd_hda_codec_conexant,snd_sof,thinkpad_acpi
snd_seq_midi           20480  0
rtwpci                 24576  0
rtw88                 610304  1 rtwpci
btrtl                  24576  1 btusb
glue_helper            16384  1 aesni_intel
mei_hdcp               24576  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            36864  1 snd_seq_midi
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
intel_rapl_msr         20480  0
btbcm                  16384  1 btusb
input_leds             16384  0
joydev                 24576  0
btintel                24576  1 btusb
mac80211              843776  2 rtwpci,rtw88
serio_raw              20480  0
intel_cstate           20480  0
intel_rapl_perf        20480  0
cfg80211              704512  2 mac80211,rtw88
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              36864  2 snd_seq,snd_pcm
bluetooth             581632  41 btrtl,btintel,btbcm,bnep,btusb,rfcomm
i915                 1986560  14
libarc4                16384  1 mac80211
rtsx_pci_ms            24576  0
snd                    90112  20 snd_hda_codec_generic,snd_seq,snd_hda_codec_conexant,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_compress,thinkpad_acpi,snd_soc_core,snd_pcm,snd_rawmidi
processor_thermal_device    24576  0
ecdh_generic           16384  2 bluetooth
intel_rapl_common      24576  2 intel_rapl_msr,processor_thermal_device
soundcore              16384  1 snd
int3403_thermal        16384  0
int340x_thermal_zone    16384  2 int3403_thermal,processor_thermal_device
intel_soc_dts_iosf     20480  1 processor_thermal_device
int3400_thermal        20480  0
acpi_thermal_rel       16384  1 int3400_thermal
ecc                    28672  1 ecdh_generic
mei_me                 40960  1
mei                   106496  3 mei_hdcp,mei_me
drm_kms_helper        184320  1 i915
memstick               20480  1 rtsx_pci_ms
i2c_algo_bit           16384  1 i915
intel_pch_thermal      16384  0
fb_sys_fops            16384  1 drm_kms_helper
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
wmi_bmof               16384  0
intel_wmi_thunderbolt    20480  0
mac_hid                16384  0
ucsi_acpi              16384  0
typec_ucsi             40960  1 ucsi_acpi
typec                  45056  1 typec_ucsi
acpi_pad              184320  0
sch_fq_codel           20480  2
parport_pc             40960  0
ppdev                  24576  0
lp                     20480  0
parport                53248  3 parport_pc,lp,ppdev
drm                   491520  5 drm_kms_helper,i915
ip_tables              32768  0
x_tables               40960  1 ip_tables
autofs4                45056  2
hid_generic            16384  0
usbhid                 57344  0
hid                   131072  2 usbhid,hid_generic
rtsx_pci_sdmmc         28672  0
crc32_pclmul           16384  0
psmouse               155648  0
nvme                   49152  1
r8169                  90112  0
nvme_core             102400  3 nvme
i2c_i801               32768  0
ahci                   40960  1
realtek                24576  1
rtsx_pci               69632  2 rtsx_pci_sdmmc,rtsx_pci_ms
libahci                32768  1 ahci
wmi                    32768  2 intel_wmi_thunderbolt,wmi_bmof
video                  49152  2 thinkpad_acpi,i915
pinctrl_cannonlake     36864  0
pinctrl_intel          28672  1 pinctrl_cannonlake

И даже драйвер присутствует:

ls /lib/firmware/rtlwifi/rtl8822befw.bin 
/lib/firmware/rtlwifi/rtl8822befw.bin

и здесь:

ls /lib/firmware/rtw88/rtw8822b_fw.bin
/lib/firmware/rtw88/rtw8822b_fw.bin

Я попытался перезапустить сетевую службу:

sudo service network-manager restart

Я попытался переустановить Ubuntu 18.04 (3 раз ...) е и сейчас Ubuntu 20.04. Ничего не сработало ... И самое странное, что когда я «пробую Ubuntu 18.04» с загрузочного USB-накопителя, Wi-Fi работает нормально, я даже могу подключиться к сети во время процесса установки, но как только загруженная версия загружается, она никогда снова работает.

Кто-нибудь может мне помочь?

Это результат ifconfig -a

enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.86.215  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::4454:48f6:fc28:db11  prefixlen 64  scopeid 0x20<link>
        ether 64:1c:67:a9:cd:7c  txqueuelen 1000  (Ethernet)
        RX packets 13303  bytes 13329507 (13.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11144  bytes 1302142 (1.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2314  bytes 212337 (212.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2314  bytes 212337 (212.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp5s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether c0:b5:d7:a2:1b:65  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
2
задан 29 July 2020 в 14:46

2 ответа

EDIT 2: I finally found a similar error described here (and a similar one here). After testing on my laptop, I could confirm that the problem happens only when I boot from the updated Linux ubuntu 5.4.0-42-generic kernel.

uname -a
Linux ubuntu 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

dmesg | grep rtw
[   10.321995] rtw_core: loading out-of-tree module taints kernel.
[   10.322041] rtw_core: module verification failed: signature and/or required key missing - tainting kernel
[   10.715315] rtw_8822be 0000:05:00.0: enabling device (0000 -> 0003)
[   11.576504] rtw_8822be 0000:05:00.0: Firmware version 27.2.0, H2C version 13
[   12.362399] rtw_8822be 0000:05:00.0 wlp5s0: renamed from wlan0
[  154.000006] rtw_8822be 0000:05:00.0: failed to read ASPM, ret=-5
[  154.003024] rtw_8822be 0000:05:00.0: failed to send h2c command
[  154.147617] rtw_8822be 0000:05:00.0: firmware failed to restore hardware setting
[  154.150646] rtw_8822be 0000:05:00.0: failed to send h2c command

To test out that this was the problem, I had to boot from a previous kernel (in my case the Linux ubuntu 5.3.0-28-generic). You can do that by rebooting the laptop, go into the Grub screen, choose Advanced options from Ubuntu and choosing a previous version to boot from. And after doing that, my Wi-Fi was working normally:

uname -a
Linux ubuntu 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

dmesg | grep rtw
[   12.777529] rtw_pci 0000:05:00.0: enabling device (0000 -> 0003)
[   12.848050] rtw_pci 0000:05:00.0: pci msi enabled
[   13.032126] rtw_pci 0000:05:00.0 wlp5s0: renamed from wlan0

lshw -C network
WARNING: you should run this program as super-user.
[...]
  *-network
       description: Wireless interface
       product: RTL8822BE 802.11a/b/g/n/ac WiFi adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: 00
       serial: c0:b5:d7:a2:1b:65
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_pci driverversion=5.3.0-28-generic firmware=N/A ip=192.168.86.186 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:142 ioport:2000(size=256) memory:a1200000-a120ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

EDIT 1: this was just temporary. The problem is back.

Now it shows as:

lshw -C network
WARNING: you should run this program as super-user.
[...]
  *-generic
       description: Wireless interface
       product: Illegal Vendor ID
       vendor: Illegal Vendor ID
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: ff
       serial: c0:b5:d7:a2:1b:65
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_8822be driverversion=5.4.0-42-generic firmware=N/A latency=255 link=no maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11
       resources: irq:142 ioport:2000(size=256) memory:a1200000-a120ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

I am trying everything again, like this:

sudo make install
make -C /lib/modules/5.4.0-42-generic/build M=/home/diego/Downloads/rtw88 modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-42-generic'
  Building modules, stage 2.
  MODPOST 10 modules
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-42-generic'
Install rtw88 SUCCESS

But it is still not working.


FIRST ANSWER:

I don't why or how this problem appeared, but here is how I fixed it:

After reinstalling Ubuntu 18.04 3 times and Ubuntu 20.04 1 time (all alongside Windows 10 as dual boot), I deleted the Ubuntu partition (from Windows disk manager), reincorporated the unused space to the Windows partition and rebooted. After that I noticed the GNU GRUB was still active at every boot. So I followed these steps to removed everything from Ubuntu until my laptop was just like it was before I installed Ubuntu for the first time. With just Windows 10.

So I just installed Ubuntu 18.04 (again alongside Windows 10 as dual boot) and now everything works just fine. That's it.

1
ответ дан 30 July 2020 в 22:03

Привет, я пробовал следующее:

https://help.ubuntu.com/stable/ubuntu-help/net-wireless-troubleshooting-hardware-check.html.en

Что было превосходно, но я не смог заставить работать RTL8822BE. Итак, это мой ответ (первый ответ на доске, если он здесь не разрешен, удалите его). Я купил еще одну карту Wi-Fi / BT m.2 для своего ноутбука (Asus Vivobook).

Я получил это:

Intel Wireless-Ac 9260, 2230, 2X2 Ac+Bt, Gigabit, без Vpro. В нем говорится, что он был разработан для процессоров Intel 8-го поколения, которые есть у моего ноутбука.

Это было очень прямолинейно. Удалите и замените разъемы карты и антенны все так же, как Realtek. Загрузите любую из моих ОС W10 или Ubuntu и запустите обновления, выберите мою сеть WiFi и войдите в систему. Это стоило 17 долларов США.

Если вы действительно застряли, я надеюсь, что это поможет.

0
ответ дан 26 August 2020 в 03:34

Другие вопросы по тегам:

Похожие вопросы: