CUDA 12.2 install | pkgconfig missing

OS: Linux
Flavor: CentOS Linx 7 (Core)
build type: run file (
command: bash --silent --toolkit --installpath=/home1/apps/cuda/12.2


I’m attempting to install CUDA 12.2 on our linux system with the specs above and using the run file provided by NVIDIA. It install’s correctly, but is missing the pkgconfig folder in the install directory. Here is a list of all installed elements from CUDA.

root@build-BLDCHROOT:12.2 # ls                                                                                          
bin                extras    lib64                    nsight-systems-2023.2.3  README   tools                           
compute-sanitizer  gds       libnvvp                  nvml                     share    version.json   
DOCS               gds-12.2  nsight-compute-2023.2.1  nvvm                     src                                      
EULA.txt           include   nsightee_plugin          targets

Our team uses the pkgconfig folder to check the installation for other builds, and it was on previous installations but for some reason is missing on this one. Is there any solution to get it to build with the correct pkgconfig folder?


Did you check in /usr/lib/pkgconfig (Ubuntu) or /usr/lib64/pkgconfig (CentOS)?

Hi Robert.

I checked the install location of cuda that I defined in my code above and there is a lib64 directory but it only contains the library files along with a cmake and stubs folder which do not contain the associated .pc files we are looking for.

cmake                         libcufile_static.a                 libcufilt.a           libnpps_static.a                 libnppicc_static.a                     libculibos.a                        libnppidei_static.a
libcublasLt_static.a                         libnvJitLink_static.a               libcurand_static.a          libcusolver_lapack_static.a  libnppif_static.a
libcublas_static.a            libcusolver_metis_static.a   
libcudadevrt.a                   libnvjpeg_static.a            libnvptxcompiler_static.a       libnppig_static.a        
libcudart_static.a                 libnvrtc-builtins_static.a                libcusolver_static.a         libnppim_static.a       
libcufft_static_nocallback.a   libnvrtc_static.a                  libcusparse_static.a         libnppist_static.a               libmetis_static.a             
libcufftw_static.a                     libnppisu_static.a           libnppc_static.a            
libcufile_rdma_static.a       stubs                libnppitc_static.a                libnppial_static.a          

It’s not in that location.

For example, on CentOS, I installed CUDA 12.1 via the runfile installer method.

Most of the “CUDA stuff” gets put in /usr/local/cuda-12.1/

However in another location, that is not part of the above path, specifically here:


I observe the following:

$ ls /usr/lib64/pkgconfig
accinj64-11.6.pc  cuinj64-12.1.pc   nppicom-12.0.pc  npps-11.7.pc
accinj64-11.7.pc  curand-10.2.pc    nppidei-11.6.pc  npps-11.8.pc
accinj64-11.8.pc  curand-10.3.pc    nppidei-11.7.pc  npps-12.0.pc
accinj64-12.0.pc  cusolver-11.3.pc  nppidei-11.8.pc  nvidia-ml-11.6.pc
accinj64-12.1.pc  cusolver-11.4.pc  nppidei-12.0.pc  nvidia-ml-11.7.pc
cublas-11.pc      cusparse-11.7.pc  nppif-11.6.pc    nvidia-ml-11.8.pc
cublas-12.pc      cusparse-12.0.pc  nppif-11.7.pc    nvidia-ml-12.0.pc
cuda-11.6.pc      libcurl.pc        nppif-11.8.pc    nvidia-ml-12.1.pc
cuda-11.7.pc      libdw.pc          nppif-12.0.pc    nvjitlink-12.0.pc
cuda-11.8.pc      libelf.pc         nppig-11.6.pc    nvjitlink-12.1.pc
cuda-12.0.pc      liblzma.pc        nppig-11.7.pc    nvjpeg-11.6.pc
cuda-12.1.pc      nppc-11.6.pc      nppig-11.8.pc    nvjpeg-11.7.pc
cudart-11.6.pc    nppc-11.7.pc      nppig-12.0.pc    nvjpeg-11.9.pc
cudart-11.7.pc    nppc-11.8.pc      nppim-11.6.pc    nvjpeg-12.0.pc
cudart-11.8.pc    nppc-12.0.pc      nppim-11.7.pc    nvjpeg-12.1.pc
cudart-12.0.pc    nppi-11.6.pc      nppim-11.8.pc    nvrtc-11.6.pc
cudart-12.1.pc    nppi-11.7.pc      nppim-12.0.pc    nvrtc-11.7.pc
cufft-10.7.pc     nppi-11.8.pc      nppist-11.6.pc   nvrtc-11.8.pc
cufft-10.9.pc     nppi-12.0.pc      nppist-11.7.pc   nvrtc-12.0.pc
cufft-11.0.pc     nppial-11.6.pc    nppist-11.8.pc   nvrtc-12.1.pc
cufftw-10.7.pc    nppial-11.7.pc    nppist-12.0.pc   nvToolsExt-11.6.pc
cufftw-10.9.pc    nppial-11.8.pc    nppisu-11.6.pc   nvToolsExt-11.7.pc
cufftw-11.0.pc    nppial-12.0.pc    nppisu-11.7.pc   nvToolsExt-11.8.pc
cufile-1.4.pc     nppicc-11.6.pc    nppisu-11.8.pc   nvToolsExt-12.0.pc
cufile-1.5.pc     nppicc-11.7.pc    nppisu-12.0.pc   nvToolsExt-12.1.pc
cufile-1.6.pc     nppicc-11.8.pc    nppitc-11.6.pc   opencl-12.0.pc
cuinj64-11.6.pc   nppicc-12.0.pc    nppitc-11.7.pc   opencl-12.1.pc
cuinj64-11.7.pc   nppicom-11.6.pc   nppitc-11.8.pc   systemd.pc
cuinj64-11.8.pc   nppicom-11.7.pc   nppitc-12.0.pc   zlib.pc
cuinj64-12.0.pc   nppicom-11.8.pc   npps-11.6.pc

Note that I have other runfile installs on this machine, so not all of the above files are due to CUDA 12.1 installation.

Hi Robert,

Gotcha, I looked inside the directory /usr/lib64/pkgconfig and there is indeed a cuda-12.2.pc file.

Out of curiosity is there anyway to control the installation of this file, or is this something that is done automatically by the runfile?


I’m not aware of any method to control where it gets installed. The runfile installer has command line help available.

Hi Robert,

I noticed that with the runfile you can extract the underlying driver runfile and source code such as which has more options.

I was attempting to install by running this file, but it says that it needs to be run as root. Is there a way to run it without root? I can run the original runfile not as root but wasn’t should how to actual driver runfile as nonroot.


The runfile driver installer definitely needs root privilege to install the driver. I’m not aware of a method to circumvent that. The driver installer does not know anything about CUDA toolkit components. Therefore it could not possibly install or deposit any pkgconfig files that pertain to the CUDA toolkit, such as cuda-12.2.pc.

The CUDA toolkit installer, on the other hand, can install certain CUDA toolkit components (everything except the driver, basically) without root privilege, if you specify paths correctly. Therefore it makes sense that it would not require root privilege. However if you attempt to run the CUDA toolkit runfile installer without root, and attempt to install the driver that way, it will fail.