Trying to install a driver--sys/types.h cannot be found

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
tessarion
Level 1
Level 1
Posts: 20
Joined: Wed May 29, 2019 11:03 pm

Trying to install a driver--sys/types.h cannot be found

Post by tessarion »

Hello all,

I'm trying to install a Pluggable ethernet adapter, which was specifically advertised as working with Linux. After procuring the driver (via https://plugable.com/pages/wired-ethern ... b3-gigabit ), I attempted to install it using the instructions in the included readme file.

However, when I ran the make command as instructed, it returned the following error:

Code: Select all

scripts/basic/fixedep.c:97:10 fatal error: sys/types.h: No such file or directory
At which point it terminated compilation. Unsurprisingly, the adapter does not work when plugged in.

Is there a way to fix this? Preferably that doesn't involve an internet connection? (since the whole reason that I got the ethernet adapter in the first place is because this is a MacBook Pro with no native ethernet jack, USB tethering off my Android doesn't work for some reason, and I need an internet connection to install the wifi drivers).

My system info is as follow:

Code: Select all

System:
  Host: tessa-elife Kernel: 5.4.0-74-generic x86_64 bits: 64 
  Desktop: Cinnamon 5.0.4 Distro: Linux Mint 20.2 Uma 
Machine:
  Type: Laptop System: Apple product: MacBookPro16,1 v: 1.0 
  serial: <superuser/root required> 
  Mobo: Apple model: Mac-E1008331FDC96864 v: MacBookPro16,1 
  serial: <superuser/root required> UEFI: Apple 
  v: 1554.100.64.0.0 (iBridge: 18.16.14556.0.0,0) date: 03/10/2021 
Battery:
  ID-1: BAT0 charge: 98.6 Wh condition: 98.6/100.2 Wh (98%) 
CPU:
  Topology: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP 
  L2 cache: 12.0 MiB 
  Speed: 800 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 4: 800 5: 800 6: 800 7: 801 8: 800 9: 800 10: 800 11: 800 12: 800 
Graphics:
  Device-1: AMD Navi 14 [Radeon RX 5500/5500M / Pro 5500M] driver: amdgpu 
  v: kernel 
  Display: x11 server: X.Org 1.20.9 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,radeon,vesa resolution: 3072x1920~60Hz 
  OpenGL: renderer: AMD NAVI14 (DRM 3.35.0 5.4.0-74-generic LLVM 11.0.0) 
  v: 4.6 Mesa 20.2.6 
Audio:
  Device-1: AMD Navi 10 HDMI Audio driver: snd_hda_intel 
  Device-2: Apple Audio driver: N/A 
  Sound Server: ALSA v: k5.4.0-74-generic 
Network:
  Device-1: Broadcom and subsidiaries BCM4364 802.11ac Wireless Network 
  Adapter 
  driver: N/A 
Drives:
  Local Storage: total: 465.92 GiB used: 8.34 GiB (1.8%) 
  ID-1: /dev/nvme0n1 vendor: Apple model: SSD AP0512N size: 465.92 GiB 
Partition:
  ID-1: / size: 457.11 GiB used: 8.34 GiB (1.8%) fs: ext4 
  dev: /dev/nvme0n1p2 
Sensors:
  System Temperatures: cpu: 45.0 C mobo: N/A gpu: amdgpu temp: 0 C 
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 0 
Info:
  Processes: 274 Uptime: 44m Memory: 15.53 GiB used: 919.0 MiB (5.8%) 
  Shell: bash inxi: 3.0.38 3
Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
jamiemint
Level 4
Level 4
Posts: 207
Joined: Fri Jun 26, 2020 12:39 pm

Re: Trying to install a driver--sys/types.h cannot be found

Post by jamiemint »

That file is provided by libc6-dev. It used to be at /usr/include/sys/types.h but it has moved to /usr/include/x86_64-linux-gnu/sys/types.h if you have an X86-64 system. You can see if you have it by typing "find /usr/include -name types.h".

I would try to change the #include line to #include "x86_64-linux-gnu/sys/types.h" or something like that.

You may need to install build-essential as well.

Jamie
tessarion
Level 1
Level 1
Posts: 20
Joined: Wed May 29, 2019 11:03 pm

Re: Trying to install a driver--sys/types.h cannot be found

Post by tessarion »

Awesome, that worked!

However! It's now looking for another file called stdlib.h -- which as far as I can tell, does not actually exist on my system. Any guesses as to where it might be?
Locked

Return to “Hardware Support”