yuk7 / ArchWSL

ArchLinux based WSL Distribution. Supports multiple install.
https://git.io/archwsl
MIT License
6.92k stars 201 forks source link

Curl and pacman broken after latest upgrade #173

Closed tigerjack closed 3 years ago

tigerjack commented 3 years ago

Describe the issue Yesterday I launched a full system upgrade, which installed the latest curl (7.74). From then, every time I try to use pacman, I get pacman: error while loading shared libraries: /usr/lib/libcurl.so.4: file too short

Indeed, this is the state of the library files

>ls -Al /usr/lib/libcurl.so*
lrwxrwxrwx 1 root root 16 Dec  9 10:19 /usr/lib/libcurl.so -> libcurl.so.4.7.0
lrwxrwxrwx 1 root root 16 Dec  9 10:19 /usr/lib/libcurl.so.4 -> libcurl.so.4.7.0
-rwxr-xr-x 1 root root  0 Dec  9 10:19 /usr/lib/libcurl.so.4.7.0

Note the 0 size. This is true also for other packages installed yesterday

>ll /usr/lib/liblz4.so*
lrwxrwxrwx 1 root root 15 Dec  8 17:35 /usr/lib/liblz4.so -> liblz4.so.1.9.3
lrwxrwxrwx 1 root root 15 Dec  8 17:35 /usr/lib/liblz4.so.1 -> liblz4.so.1.9.3
-rwxr-xr-x 1 root root  0 Dec  8 17:35 /usr/lib/liblz4.so.1.9.3

The log file from pacman does not show anything relevant

Indeed, by checking the files in /var/cache/pacman/pkg/, I have this

-rw-r--r-- 1 root root     0 Dec 10 21:04 archlinux-keyring-20201210-1-any.pkg.tar.zst
-rw-r--r-- 1 root root     0 Dec  9 10:24 curl-7.74.0-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root     0 Dec 10 23:03 imagemagick-7.0.10.48-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root     0 Dec  8 17:35 lz4-1:1.9.3-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root     0 Dec 10 20:37 plocate-1.1.2-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root     0 Dec 10 20:18 python-cryptography-3.3.1-1-x86_64.pkg.tar.zst

I managed to somehow make the system work again using the steps described in arch forum, but I was wondering if this is a generic Arch bug or it's only related to the WSL installation.

Enviroment:

escape0707 commented 3 years ago

If you mean curl-7.74.0-1, I've just did a full system upgrade too, but pacman is still functioning. WSL2 w/ Windows 10.0.19042.685 Btw, @yuk7 do we have any formal way to check current ArchWSL version? I couldn't find any info either.

tigerjack commented 3 years ago

yep, that's exactly it. So I guess that it's just a general problem with Arch itself. Thanks for your help.

yuk7 commented 3 years ago

@escape0707 I don't provide a way to find out the version other than appx... It seems better to enclose a file that describes version info.