nvidia – Error while installing GCC on Ubuntu 18.10

I was completely silly and I uninstalled the GCC installation of Ubuntu 18.10. During the process, the DKMS and Nvidia drivers were also removed. After a long battle, I now have a clean package system, but when I try to install gcc, the following error appears:

sudo apt-get install gcc
Reading package lists ... Done
Build a dependency tree
Reading status information ... Done
Suggested packages:
gcc-multilib libtool flex bison gcc-doc
The following new packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 5 220 billion of archives.
After this operation, 51.2 KB of additional disk space will be used.
Get: 1 http://dk.archive.ubuntu.com/ubuntu cosmic / main amd64 gcc amd64 4: 8.2.0-1ubuntu1 [5,220 B]
5220 B in 0s (72.6 kb / s)
Previously unselected package selection gcc.
(Reading the database ... 231772 files and directories currently installed.)
Preparing for decompression ... / gcc_4% 3a8.2.0-1ubuntu1_amd64.deb ...
Unpack gcc (4: 8.2.0-1ubuntu1) ...
Setting up of gcc (4: 8.2.0-1ubuntu1) ...
update-alternatives: error: the alternative path / usr / bin / gcc does not exist
dpkg: gcc error handling package (--configure):
the post-installation script subprocess of the installed gcc package returned the error exit state 2
Trigger processing for man-db (2.8.4-2) ...
Errors were encountered during treatment:
E: The / usr / bin / dpkg subprocess returned an error code (1)