I tried installing nvidia drivers through an install script but got the error
ERROR: Unable to find the development tool `cc` in your
path; please make sure that you have the package
'gcc' installed. If gcc is installed on your system,
then please check that `cc` is in your PATH.
When i used apt it said that gcc was already installed but using which returned nothing.I then decided to try to reinstall it which resulted in this, idk whats happening but alot of packages turn out like this and i have no idea what to do.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
Need to get 5,112 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 gcc amd64 4:11.2.0-1ubuntu1 [5,112 B]
Fetched 5,112 B in 0s (39.7 kB/s)
dpkg: warning: files list file for package 'libuno-cppuhelpergcc3-3' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-mingw-w64-i686-win32' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libuno-purpenvhelpergcc3-3' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libx32gcc-s1' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-mingw-w64-i686-posix' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-mingw-w64-base:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-12-base:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-12-base:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-mingw-w64-i686' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-mingw-w64-i686-posix-runtime' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libx32gcc-11-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-12' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'lib32gcc-s1' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-11' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-mingw-w64-i686-win32-runtime' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gdm3' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libuno-salhelpergcc3-3' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-11-multilib' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-multilib' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'lib32gcc-11-dev' missing; assuming package has no files currently installed
(Reading database ... 450000 files and directories currently installed.)
Preparing to unpack .../gcc_4%3a11.2.0-1ubuntu1_amd64.deb ...
Unpacking gcc (4:11.2.0-1ubuntu1) over (4:11.2.0-1ubuntu1) ...
Setting up gcc (4:11.2.0-1ubuntu1) ...
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.10.2-1) ...
/usr/bin/mandb: can't chmod /var/cache/man/de.UTF-8/CACHEDIR.TAG: Operation not permitted
/usr/bin/mandb: can't remove /var/cache/man/de.UTF-8/CACHEDIR.TAG: Operation not permitted
/usr/bin/mandb: can't rename /var/cache/man/de.UTF-8/15728 to /var/cache/man/de.UTF-8/index.db: Operation not permitted
/usr/bin/mandb: can't chmod /var/cache/man/de.UTF-8/index.db: Operation not permitted
/usr/bin/mandb: can't remove /var/cache/man/de.UTF-8/index.db: Operation not permitted
/usr/bin/mandb: can't chmod /var/cache/man/oldlocal/CACHEDIR.TAG: Operation not permitted
/usr/bin/mandb: can't remove /var/cache/man/oldlocal/CACHEDIR.TAG: Operation not permitted
Errors were encountered while processing:
gcc
E: Sub-process /usr/bin/dpkg returned an error code (1)
Edit: the issue rooted from me reinstalling with home, var, and etc folders from a previous install. I was trying to avoid reinstalling again but I caved.
gcc
with? There are two packages available for 22.04.3. Bothgcc-11
andgcc-12
are available, and that is also their package names. – Terrance Jan 16 '24 at 02:30cc
to be in the path. – Terrance Jan 16 '24 at 02:44/var/cache/man/
. I'd also suggest checking for extended file attributes usinglsattr
- see for example Renaming messages but it shows "Operation not permitted" on linux system – steeldriver Jan 16 '24 at 13:21