im using ubuntu on wsl2 andthe problem began when i tried to install these packages with apt
:
apt install clang cmake ninja-build pkg-config
then i faced with this error:
Setting up python3-yaml (5.3.1-1ubuntu0.1) .../var/lib/dpkg/info/python3-yaml.postinst: 6: py3compile: not founddpkg: error processing package python3-yaml (--configure): installed python3-yaml package post-installation script subprocess returned error exit status 127Setting up libobjc4:amd64 (10.5.0-1ubuntu1~20.04) ...Setting up libffi-dev:amd64 (3.3-4) ...Setting up libclang-cpp10 (1:10.0.0-4ubuntu1) ...Setting up ninja-build (1.10.0-1build1) ...Setting up python3-pygments (2.3.1+dfsg-1ubuntu2.2) .../var/lib/dpkg/info/python3-pygments.postinst: 6: py3compile: not founddpkg: error processing package python3-pygments (--configure): installed python3-pygments package post-installation script subprocess returned error exit status 127Setting up libz3-4:amd64 (4.8.7-4build1) ...Setting up libpfm4:amd64 (4.10.1+git20-g7700f49-2) ...Setting up libclang1-10 (1:10.0.0-4ubuntu1) ...Setting up binfmt-support (2.2.0-2) ...update-binfmts: warning: /usr/share/binfmts/python3.8: no executable /usr/bin/python3.8 found, but continuing anyway as you requestCreated symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.Setting up pkg-config (0.29.1-0ubuntu4) ...Setting up libobjc-9-dev:amd64 (9.4.0-1ubuntu1~20.04.2) ...Setting up libomp5-10:amd64 (1:10.0.0-4ubuntu1) ...Setting up librhash0:amd64 (1.3.9-1) ...Setting up libc6-i386 (2.31-0ubuntu9.14) ...Setting up cmake-data (3.16.3-1ubuntu1.20.04.1) ...Setting up libjsoncpp1:amd64 (1.7.4-3.1ubuntu2) ...Setting up libtinfo-dev:amd64 (6.2-0ubuntu2.1) ...Setting up libz3-dev:amd64 (4.8.7-4build1) ...dpkg: dependency problems prevent configuration of llvm-10-tools: llvm-10-tools depends on python3-pygments; however: Package python3-pygments is not configured yet. llvm-10-tools depends on python3-yaml; however: Package python3-yaml is not configured yet.dpkg: error processing package llvm-10-tools (--configure): dependency problems - leaving unconfiguredSetting up libomp-10-dev (1:10.0.0-4ubuntu1) ...Setting up llvm-10-runtime (1:10.0.0-4ubuntu1) ...dpkg: dependency problems prevent configuration of llvm-10-dev: llvm-10-dev depends on llvm-10-tools (= 1:10.0.0-4ubuntu1); however: Package llvm-10-tools is not configured yet.dpkg: error processing package llvm-10-dev (--configure): dependency problems - leaving unconfiguredSetting up lib32gcc-s1 (10.5.0-1ubuntu1~20.04) ...Setting up lib32stdc++6 (10.5.0-1ubuntu1~20.04) ...Setting up cmake (3.16.3-1ubuntu1.20.04.1) ...Setting up libclang-common-10-dev (1:10.0.0-4ubuntu1) ...Setting up llvm-10 (1:10.0.0-4ubuntu1) ...Setting up clang-10 (1:10.0.0-4ubuntu1) ...Setting up clang (1:10.0-50~exp1) ...Processing triggers for libc-bin (2.31-0ubuntu9.14) ...Processing triggers for systemd (245.4-4ubuntu3.23) ...Processing triggers for man-db (2.9.1-1) ...Processing triggers for install-info (6.7.0.dfsg.2-5) ...Errors were encountered while processing: python3-yaml python3-pygments llvm-10-tools llvm-10-devE: Sub-process /usr/bin/dpkg returned an error code (1)
i read this question since it was similar to mine and i tried:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt install libavahi-glib1 --reinstall
but each of these three commands gaved me the same error:
/var/lib/dpkg/info/python3-yaml.postinst: 6: py3compile: not founddpkg: error processing package python3-yaml (--configure): installed python3-yaml package post-installation script subprocess returned error exit status 127Setting up gconf2 (3.2.6-6ubuntu1) .../var/lib/dpkg/info/gconf2.postinst: 74: gconf-schemas: not founddpkg: error processing package gconf2 (--configure): installed gconf2 package post-installation script subprocess returned error exit status 127Setting up python3-pygments (2.3.1+dfsg-1ubuntu2.2) .../var/lib/dpkg/info/python3-pygments.postinst: 6: py3compile: not founddpkg: error processing package python3-pygments (--configure): installed python3-pygments package post-installation script subprocess returned error exit status 127Setting up libavahi-glib1:amd64 (0.7-4ubuntu7.3) ...dpkg: dependency problems prevent configuration of llvm-10-tools: llvm-10-tools depends on python3-pygments; however: Package python3-pygments is not configured yet. llvm-10-tools depends on python3-yaml; however: Package python3-yaml is not configured yet.dpkg: error processing package llvm-10-tools (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of llvm-10-dev: llvm-10-dev depends on llvm-10-tools (= 1:10.0.0-4ubuntu1); however: Package llvm-10-tools is not configured yet.dpkg: error processing package llvm-10-dev (--configure): dependency problems - leaving unconfiguredProcessing triggers for libc-bin (2.31-0ubuntu9.14) ...Errors were encountered while processing: python3-yaml gconf2 python3-pygments llvm-10-tools llvm-10-devE: Sub-process /usr/bin/dpkg returned an error code (1)
i would appreciate any help for fixing this problem 🙌