Issue
I'm trying to install the python3-bsddb3 package, but I continually receive this error message. Any help would be greatly appreciated. I'm running Ubuntu 16.10.
$ sudo apt-get -f install
[sudo] password for richard:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
python3-bsddb3
Suggested packages:
python3-bsddb3-dbg
The following NEW packages will be installed:
python3-bsddb3
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/98.2 kB of archives.
After this operation, 580 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 412146 files and directories currently installed.)
Preparing to unpack .../python3-bsddb3_6.1.0-1build2_amd64.deb ...
Unpacking python3-bsddb3 (6.1.0-1build2) ...
dpkg: error processing archive /var/cache/apt/archives/python3-bsddb3_6.1.0-1build2_amd64.deb (--unpack):
trying to overwrite '/usr/include/python3.5', which is also in package libpython3.5-dev:amd64 3.5.2-6
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/python3-bsddb3_6.1.0-1build2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Some backstory: I was running Ubuntu 16.04. I had problems configuring Eclipse to load a Python 3 module, so I (stupidly) thought I should try uninstalling Python 3 (sudo apt remove python3
) and then reinstalling it, so see if that would clean up any problems I may have created in the past on my system. Sigh. That blew away most of the UX for Ubuntu, leaving me with a system that booted into my wallpaper, but with no Unity or other GUI tools to use... just a moving mouse cursor. I learned how to use Ctrl-Alt-F1 to gain access to the terminal. From that terminal, I upgraded from 16.04 to 16.10, hoping that would reinstall the Gnome GUI features. Sigh. That left me with a black screen and mouse cursor. Fun to move the mouse around, but of little use otherwise. Then I leaned that I needed to install the desktop environment. Now my system seems back to normal, only I'm having trouble installing GRAMPS, the genealogical package that requires the python3-bsddb3 package. Python3 otherwise seems to run fine for my other uses, including in Eclipse with PyDev.
My reading of the error message is that there is a problem with the file /usr/include/python3.5
. I've checked that it does in fact exist. I'm afraid to delete it or alter it now without advice, given my earlier adventure blowing away Python3.
Apologies for being an inadvertently self-destructive Linux idiot.
Solution
I renamed /usr/include/python3.5
to /usr/include/python3.5_backup
and then continued with the installation without problems. Since then, I have not noticed any problems with writing or running Python3 code or using other Python3 modules. If problems arise, I'll revert to the backup version of the file.
Answered By - trinkner Answer Checked By - Gilberto Lyons (WPSolving Admin)