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 using ubuntu 12 i am unable to install software from unix or from linux i am getting following error

reiki@reiki ~ $ sudo apt-get install preload
[sudo] password for reiki: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  preload
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
1 not fully installed or removed.
Need to get 35.6 kB of archives.
After this operation, 138 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ quantal/universe preload i386 0.6.4-2 [35.6 kB]
Fetched 35.6 kB in 1s (34.8 kB/s)
Selecting previously unselected package preload.
(Reading database ... 262032 files and directories currently installed.)
Unpacking preload (from .../preload_0.6.4-2_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up opera (12.15.1748-1linuxmint) ...
ERROR:root:DebFileApplication import
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in <module>
    from debfile import DebFileApplication, DebFileOpenError
  File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in <module>
    from softwarecenter.db.application import Application, AppDetails
  File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>
    import softwarecenter.distro
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 197, in <module>
    distro_instance = _get_distro()
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 172, in _get_distro
    module = __import__(distro_module_name, globals(), locals(), [], -1)
ImportError: No module named linuxmint
Traceback (most recent call last):
  File "/usr/sbin/update-software-center", line 38, in <module>
    from softwarecenter.db.update import rebuild_database
  File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in <module>
    from softwarecenter.backend.scagent import SoftwareCenterAgent
  File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 28, in <module>
    from softwarecenter.distro import get_distro, get_current_arch
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 197, in <module>
    distro_instance = _get_distro()
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 172, in _get_distro
    module = __import__(distro_module_name, globals(), locals(), [], -1)
ImportError: No module named linuxmint
dpkg: error processing opera (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up preload (0.6.4-2) ...
 * Starting Adaptive readahead daemon preload                            [ OK ] 
Processing triggers for menu ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
 opera
E: Sub-process /usr/bin/dpkg returned an error code (1)
reiki@reiki ~ $ 

When i try to remove opera then i got following error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  opera
0 upgraded, 0 newly installed, 1 to remove and 21 not upgraded.
1 not fully installed or removed.
After this operation, 45.0 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 261623 files and directories currently installed.)
Removing opera ...
ERROR:root:DebFileApplication import
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in <module>
    from debfile import DebFileApplication, DebFileOpenError
  File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in <module>
    from softwarecenter.db.application import Application, AppDetails
  File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>
    import softwarecenter.distro
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 197, in <module>
    distro_instance = _get_distro()
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 172, in _get_distro
    module = __import__(distro_module_name, globals(), locals(), [], -1)
ImportError: No module named linuxmint
Traceback (most recent call last):
  File "/usr/sbin/update-software-center", line 38, in <module>
    from softwarecenter.db.update import rebuild_database
  File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in <module>
    from softwarecenter.backend.scagent import SoftwareCenterAgent
  File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 28, in <module>
    from softwarecenter.distro import get_distro, get_current_arch
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 197, in <module>
    distro_instance = _get_distro()
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 172, in _get_distro
    module = __import__(distro_module_name, globals(), locals(), [], -1)
ImportError: No module named linuxmint
dpkg: error processing opera (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Processing triggers for menu ...
Errors were encountered while processing:
 opera
E: Sub-process /usr/bin/dpkg returned an error code (1)

now i am unable to remove opera

share|improve this question
    
What is it that you're trying to install? Are using Mint? Are you trying to install opera fro mint? –  Mitch May 4 '13 at 9:36
    
Actually i have installed opera and i am tring to install software from preload –  John Farnandus May 4 '13 at 9:49
    
i have got this same issue when i install any software –  John Farnandus May 4 '13 at 9:49
add comment

1 Answer

up vote 2 down vote accepted

This is not really nice solution but should work in similar cases

sudo /bin/rm /var/lib/dpkg/info/opera*.postrm
sudo dpkg -P opera

Your problem is that post remove script from package doesn't work so this is why uninstall failed. If removing postrm script won't work, try to put empty bash script into this file and do package uninstall again.

share|improve this answer
add comment

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.