Installation error with CUDA7 that can not be corrected.

I tried to install cuda7 on a new ubuntu 14.04 LTS workstation and received the following error massage.

"
trying to overwrite ‘/etc/OpenCL/vendors/nvidia.icd’, which is also in package nvidia-opencl-icd-331-updates 331.113-0ubuntu0.0.4
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-opencl-icd-346_346.47-0ubuntu1~xedgers14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
"
Can not correct it with “apt-get -f install”. Please help!

start over with a clean OS install and use the runfile installer method instead of the package manager installer method.

Thanks for the response. There are a number of licensed software packages in the system already and will be really pain-taken to reinstall. Any other way to correct it?

Try using the runfile installer. If you have trouble, review the installer log files.

I have tried runfile installer. It went through smoothly.

However, “apt-get -f install” still gives me the same error as following:


apt-get -f install

Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
libavcodec54 libavdevice53 libavformat54 libavutil52 libdc1394-22 libgsm1
libgtkglext1 libjs-jquery libopencv-core2.4 libopencv-highgui2.4
libopencv-imgproc2.4 libopus0 libswscale2 libtbb2
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
nvidia-opencl-icd-346
The following NEW packages will be installed:
nvidia-opencl-icd-346
0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
4 not fully installed or removed.
Need to get 0 B/7,827 kB of archives.
After this operation, 26.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database … 312353 files and directories currently installed.)
Preparing to unpack …/nvidia-opencl-icd-346_346.47-0ubuntu1~xedgers14.04.1_amd64.deb …
Unpacking nvidia-opencl-icd-346 (346.47-0ubuntu1~xedgers14.04.1) …
dpkg: error processing archive /var/cache/apt/archives/nvidia-opencl-icd-346_346.47-0ubuntu1~xedgers14.04.1_amd64.deb (–unpack):
trying to overwrite ‘/etc/OpenCL/vendors/nvidia.icd’, which is also in package nvidia-opencl-icd-331-updates 331.113-0ubuntu0.0.4
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-opencl-icd-346_346.47-0ubuntu1~xedgers14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

We keep receiving warnings from the “package manager” but not able to correct it:-)

Any advice on how to correct it ?

Thanks in advance!

I am having the same issue. Have been struggling with it for over a day now. If you have found a solution, kindly share it here. If not, can you guide me to remove all nvidia packages from Ubuntu, maybe reinstalling Cuda will help.
Thanks in advance!

Found a solution to all this mess.

Ran the following two commands and got my dependencies resolved.

sudo dpkg -P nvidia-opencl-icd-331-updates
sudo apt-get install -f

Restart your system after this.

Found a solution to a similar problem here:
http://askubuntu.com/questions/441047/dpkg-deb-error-subprocess-paste-was-killed-by-signal-broken-pipe-nginx

Thank you @mnoumanshahzad, the above solution solved the issue.

Tried the same thing and now my system says “The system is running in low-graphics mode”, and I can’t get out of that. Any help?