Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to update my version of Shotwell. Well, my Ubuntu system is. I am getting the following apt-get error. Can anyone tell me how to resolve it? I have tried a few different things so now asking for help.

root@nathanr-XPS-630i:/home/nathanr# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  shotwell
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.8 MB of archives.
After this operation, 25.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ppa.launchpad.net/yorba/ppa/ubuntu/ saucy/main shotwell i386 0.15.1-1~saucy1 [10.8 MB]
Fetched 10.8 MB in 2min 16s (79.5 kB/s)                                                                                                                                                
(Reading database ... 316303 files and directories currently installed.)
Preparing to replace shotwell 0.15.0-0ubuntu1 (using .../shotwell_0.15.1-1~saucy1_i386.deb) ...
Unpacking replacement shotwell ...
dpkg: error processing /var/cache/apt/archives/shotwell_0.15.1-1~saucy1_i386.deb (--unpack):
 trying to overwrite '/usr/share/icons/hicolor/24x24/apps/shotwell.svg', which is also in package shotwell-common 0.15.0-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
No apport report written because MaxReports is reached already                                                              Processing triggers for     software-center ...
INFO:softwarecenter.db.update:translation information in database is up-to-date
Processing triggers for hicolor-icon-theme ...
Errors were encountered while processing:
 /var/cache/apt/archives/shotwell_0.15.1-1~saucy1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any suggestions what I need to do?

share|improve this question
    
BTW, don't log in as root, use sudo instead –  Braiam Jan 16 at 15:34

3 Answers 3

Try this command on terminal,

sudo dpkg -i --force-overwrite /var/cache/apt/archives/shotwell_0.15.1-1~saucy1_i386.deb

This error occurs when some file was moved from one package to another in a newer version.

In your case dpkg trying to extract shotwell.svg file from /var/cache/apt/archives/shotwell_0.15.1-1~saucy1_i386.deb to /usr/share/icons/hicolor/24x24/apps/ directory.But there was already a shotwell.svg file in that directory.So this type of error occurs.

By running dpkg -i --force-overwrite command,the previously located file shotwell.svg was forcely overwrited by the file from the /var/cache/apt/archives/shotwell_0.15.1-1~saucy1_i386.deb while installing.

Here is the source.

share|improve this answer
    
this solution worked for me only after I run this command: sudo chmod 777 /var/cache/apt/archives/shotwell_0.15.1-1~saucy1_i386.deb –  kdureidy Feb 22 at 6:36
    
But for mine the above single command works. –  Avinash Raj Feb 22 at 6:38
    
you only need to add chmod command to make executable, that's will make your solution perfect, and it will work for everybody. –  kdureidy Feb 22 at 6:43
    
Did you try my another answer? –  Avinash Raj Feb 22 at 6:45
    
it tried your single command, and it failed until i used chmod –  kdureidy Feb 22 at 6:47

Try these commands,

sudo dpkg -r shotwell-common
sudo apt-get install shotwell

apt-get may or may not work in this case of removing shotwell-common package.

share|improve this answer

You should report such things to the PPA owner. He's not separating non-architecture specific files or setting that shotwell breaks/has conflicts with the shotwell-common package.

The correct way to do it is removing the repository shotwell-common package then installing the one from the ppa:

sudo apt-get purge shotwell-common
sudo apt-get install shotwell

This will prevent headaches while upgrading packages.

➜  ~  apt-cache policy shotwell-common
shotwell-common:
  Installed: 0.14.1-3
  Candidate: 0.14.1-3
  Version table:
 *** 0.14.1-3 0
        500 http://ftp.us.debian.org/debian/ testing/main i386 Packages
        100 /var/lib/dpkg/status
➜  ~  sudo dpkg -i Downloads/shotwell*
[sudo] password for braiam: 
(Reading database ... 188756 files and directories currently installed.)
Preparing to unpack .../shotwell_0.15.1-1~saucy1_i386.deb ...
Unpacking shotwell (0.15.1-1~saucy1) over (0.14.1-3) ...
dpkg: error processing archive Downloads/shotwell_0.15.1-1~saucy1_i386.deb (--install):
 trying to overwrite '/usr/share/icons/hicolor/24x24/apps/shotwell.svg', which is also in package shotwell-common 0.14.1-3
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for menu (2.1.46) ...
Errors were encountered while processing:
 Downloads/shotwell_0.15.1-1~saucy1_i386.deb
➜  ~  sudo apt-get --reinstall install shotwell-common=0.14.1-3 shotwell=0.14.1-3       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 12 not upgraded.
Need to get 3,901 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ testing/main shotwell-common all 0.14.1-3 [1,965 kB]
Get:2 http://ftp.us.debian.org/debian/ testing/main shotwell i386 0.14.1-3 [1,936 kB]
Fetched 3,901 kB in 24s (157 kB/s)                                             
(Reading database ... 188756 files and directories currently installed.)
Preparing to unpack .../shotwell-common_0.14.1-3_all.deb ...
Unpacking shotwell-common (0.14.1-3) over (0.14.1-3) ...
Preparing to unpack .../shotwell_0.14.1-3_i386.deb ...
Unpacking shotwell (0.14.1-3) over (0.14.1-3) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for gnome-menus (3.8.0-2) ...
Processing triggers for mime-support (3.54) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for libglib2.0-0:i386 (2.36.4-1) ...
Processing triggers for man-db (2.6.5-3) ...
Processing triggers for menu (2.1.46) ...
Setting up shotwell-common (0.14.1-3) ...
Setting up shotwell (0.14.1-3) ...
Processing triggers for menu (2.1.46) ...
➜  ~  sudo apt-get remove shotwell-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgee2 libgexiv2-2 libraw9
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  shotwell shotwell-common
0 upgraded, 0 newly installed, 2 to remove and 12 not upgraded.
After this operation, 12.1 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 188756 files and directories currently installed.)
Removing shotwell (0.14.1-3) ...
Removing shotwell-common (0.14.1-3) ...
Processing triggers for menu (2.1.46) ...
Processing triggers for man-db (2.6.5-3) ...
Processing triggers for libglib2.0-0:i386 (2.36.4-1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for gnome-menus (3.8.0-2) ...
Processing triggers for mime-support (3.54) ...
➜  ~  sudo dpkg -i Downloads/shotwell*.deb                      
Selecting previously unselected package shotwell.
(Reading database ... 188477 files and directories currently installed.)
Preparing to unpack .../shotwell_0.15.1-1~saucy1_i386.deb ...
Unpacking shotwell (0.15.1-1~saucy1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for man-db (2.6.5-3) ...
Processing triggers for libglib2.0-0:i386 (2.36.4-1) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for gnome-menus (3.8.0-2) ...
Processing triggers for mime-support (3.54) ...
Processing triggers for menu (2.1.46) ...
➜  ~  
share|improve this answer
    
Thanks this resolved it. –  Lionslair Jan 26 at 4:55
    
@Lionslair the correct way is marking the answer as accepted ;) –  Braiam Jan 26 at 5:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.