Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2930

Can't install GCC in Ubuntu 20.04 WSL

$
0
0

I have tried to install gcc in Ubuntu 20.04 on WSL :

apt -y install gcc return error:

Reading package lists... DoneBuilding dependency treeReading state information... Donegcc is already the newest version (4:9.3.0-1ubuntu2).0 upgraded, 0 newly installed, 0 to remove and 194 not upgraded.1 not fully installed or removed.After this operation, 0 B of additional disk space will be used.Setting up gcc (4:9.3.0-1ubuntu2) ...update-alternatives: error: alternative path /usr/bin/gcc doesn't existdpkg: error processing package gcc (--configure): installed gcc package post-installation script subprocess returned error exit status 2Errors were encountered while processing: gccE: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to fix it with :

sudo dpkg --purge --force-depends gcc sudo apt-get autoremove -ysudo apt-get autoclean -ysudo apt-get clean gccsudo apt-get install gcc

But then I got error :

    root@LAP123:/home/my_user# sudo apt-get install gcc   .......Setting up desktop-file-utils (0.24-1ubuntu3) ...    /var/lib/dpkg/info/desktop-file-utils.postinst: 5: update-desktop-database: not found    dpkg: error processing package desktop-file-utils (--configure):     installed desktop-file-utils package post-installation script subprocess returned error exit status 127    Setting up gcc (4:9.3.0-1ubuntu2) ...    update-alternatives: error: alternative path /usr/bin/gcc doesn't exist    dpkg: error processing package gcc (--configure):     installed gcc package post-installation script subprocess returned error exit status 2    Processing triggers for man-db (2.9.1-1) ...    Errors were encountered while processing:     desktop-file-utils     gcc    E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I install gcc in my Ubuntu?


Viewing all articles
Browse latest Browse all 2930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>