Wine: could not load kernel32.dll, status c0000135

I just installed wine, wine gecko and wine mono along with winetricks from pamac but when I try to run winetricks or winecfg I get a message:

wine: could not load kernel32.dll, status c0000135

When I search for kernel32.dll I found it in

/usr/lib/wine/x86_64-windows

Here is my system info from inxi --full --verbosity=7 --filter --no-host if needed.

inxi --full --verbosity=7 --filter --no-host                     ✔ 
System:
  Kernel: 5.10.41-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  Desktop: GNOME 3.38.4 tk: GTK 3.24.29 wm: gnome-shell dm: GDM 40.0 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: HP product: HP ENVY m7 Notebook 
  v: Type1ProductConfigId serial: <filter> Chassis: type: 10 
  serial: <filter> 
  Mobo: HP model: 81D4 v: KBC Version 87.21 serial: <filter> UEFI: Insyde 
  v: F.56 date: 06/12/2018 
Battery:
  ID-1: BAT0 charge: 16.6 Wh (64.6%) condition: 25.7/25.7 Wh (100.0%) 
  volts: 11.8 min: 11.6 model: Hewlett-Packard Primary type: Li-ion 
  serial: <filter> status: Charging 
Memory:
  RAM: total: 15.52 GiB used: 2.23 GiB (14.3%) 
  RAM Report: 
  permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: Dual Core model: Intel Core i7-7500U bits: 64 type: MT MCP 
  arch: Amber/Kaby Lake note: check rev: 9 cache: L2: 4 MiB bogomips: 23209 
  Speed: 600 MHz min/max: 400/3500 MHz Core speeds (MHz): 1: 600 2: 600 
  3: 600 4: 600 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon 
  art avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid 
  cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est 
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window 
  hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm 
  lm mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae 
  pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti 
  pts rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 
  sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust 
  tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt 
  xsaves xtopology xtpr 
Graphics:
  Device-1: Intel HD Graphics 620 vendor: Hewlett-Packard driver: i915 
  v: kernel bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300 
  Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Hewlett-Packard 
  driver: nvidia v: 465.31 bus-ID: 04:00.0 chip-ID: 10de:134d class-ID: 0302 
  Device-3: Chicony HP IR Camera type: USB driver: uvcvideo bus-ID: 1-5:2 
  chip-ID: 04f2:b591 class-ID: 0e02 serial: <filter> 
  Device-4: Chicony HP TrueVision HD type: USB driver: uvcvideo 
  bus-ID: 1-6:3 chip-ID: 04f2:b592 class-ID: 0e02 serial: <filter> 
  Display: x11 server: X.org 1.20.11 compositor: gnome-shell driver: 
  loaded: modesetting unloaded: intel,nouveau failed: nvidia 
  alternate: fbdev,nv,vesa resolution: <missing: xdpyinfo> 
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.1.2 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9d71 
  class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.41-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.28 running: no 
Network:
  Device-1: Intel Wireless 7265 driver: iwlwifi v: kernel port: 5040 
  bus-ID: 01:00.0 chip-ID: 8086:095a class-ID: 0280 
  IF: wlp1s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8169 v: kernel port: 4000 bus-ID: 02:00.0 
  chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp2s0 state: down mac: <filter> 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb 
  v: 0.8 bus-ID: 1-8:4 chip-ID: 8087:0a2a class-ID: e001 
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends 
Logical:
  Message: No logical block device data found. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 931.51 GiB used: 19.6 GiB (2.1%) 
  ID-1: /dev/sda vendor: Western Digital model: WD10JPVX-22JC3T0 
  size: 931.51 GiB speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> 
  rev: 1A01 scheme: GPT 
  Optical-1: /dev/sr0 vendor: hp model: DVDRW DA8AESH rev: XH61 
  dev-links: cdrom 
  Features: speed: 24 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
Partition:
  ID-1: / size: 58 GiB used: 19.52 GiB (33.7%) fs: ext4 dev: /dev/sda6 
  label: N/A uuid: a4e2f38e-334f-4d53-ac0a-91f6acb1ef43 
  ID-2: /boot/efi size: 96 MiB used: 74.2 MiB (77.3%) fs: vfat 
  dev: /dev/sda1 label: N/A uuid: DA46-5664 
Swap:
  Alert: No swap data was found. 
Unmounted:
  ID-1: /dev/sda2 size: 16 MiB fs: <superuser required> label: N/A uuid: N/A 
  ID-2: /dev/sda3 size: 124.4 GiB fs: ntfs label: Local Disk 
  uuid: 582C5A902C5A68D0 
  ID-3: /dev/sda4 size: 499 MiB fs: ntfs label: N/A uuid: B4B873F8B873B786 
  ID-4: /dev/sda5 size: 624.37 GiB fs: ntfs label: DATA 
  uuid: 0C323A19323A086A 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-2:5 info: Lenovo Optical Mouse type: Mouse 
  driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s 
  power: 100mA chip-ID: 17ef:608d class-ID: 0301 
  Device-2: 1-5:2 info: Chicony HP IR Camera type: Video driver: uvcvideo 
  interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 04f2:b591 
  class-ID: 0e02 serial: <filter> 
  Device-3: 1-6:3 info: Chicony HP TrueVision HD type: Video 
  driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA 
  chip-ID: 04f2:b592 class-ID: 0e02 serial: <filter> 
  Device-4: 1-8:4 info: Intel Bluetooth wireless interface type: Bluetooth 
  driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA 
  chip-ID: 8087:0a2a class-ID: e001 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 
  speed: 5 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 42.0 C mobo: 0.0 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 210 Uptime: 1h 36m wakeups: 5 Init: systemd v: 247 Compilers: 
  gcc: 11.1.0 Packages: pacman: 1360 Shell: Zsh v: 5.8 
  running-in: gnome-terminal inxi: 3.3.04

Hello @ClassicNoob :wink:

That has to do with your wine prefix. Delete the standard prefix (~/.wine) or create a new custom one with:

mkdir -p ~/myapp/prefix
export WINEPREFIX=$HOME/myapp/prefix 
export WINEARCH=win32 
export WINEPATH=$HOME/myapp 
wineboot --init
winetricks
3 Likes

Thanks I deleted ~/.wine and ran winecfg and it reconfigured itself and its working now!
I thought I had done this already but I must not have done it fearing what it would mess up :smiley:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.