LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-28-2016, 10:09 AM   #1
akshay225
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Rep: Reputation: Disabled
cannot install any software in ubuntu


Hi, I just installed ubuntu 14.
But I am unable to install even a single software.(vlc,chromium,etc.)
I tried and got the following error.
E: Sub-process /usr/bin/dpkg returned an error code (2)
Here is the full code
akshay@akshay-Ub:~$ sudo apt-get install chromium-browser
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
chromium-browser-l10n chromium-codecs-ffmpeg-extra
Suggested packages:
webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin
The following NEW packages will be installed:
chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra
0 upgraded, 3 newly installed, 0 to remove and 61 not upgraded.
Need to get 72,8 MB of archives.
After this operation, 283 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://se.archive.ubuntu.com/ubuntu/ trusty-updates/universe chromium-codecs-ffmpeg-extra amd64 49.0.2623.87-0ubuntu0.14.04.1.1112 [890 kB]
Get:2 http://se.archive.ubuntu.com/ubuntu/ trusty-updates/universe chromium-browser-l10n all 49.0.2623.87-0ubuntu0.14.04.1.1112 [3 302 kB]
Get:3 http://se.archive.ubuntu.com/ubuntu/ trusty-updates/universe chromium-browser amd64 49.0.2623.87-0ubuntu0.14.04.1.1112 [68,6 MB]
Fetched 72,8 MB in 22s (3 283 kB/s)
Selecting previously unselected package chromium-codecs-ffmpeg-extra.
E: Sub-process /usr/bin/dpkg returned an error code (2)

I even tried in ubuntu software center. still it fails.
 
Old 03-28-2016, 10:50 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Is your system up to date?
Code:
sudo apt-get update
sudo apt-get upgrade
 
Old 03-28-2016, 11:14 AM   #3
akshay225
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
I executed sudo apt-get update. It updated. it worked.
then i tried sudo apt-get upgrade. Then again I got the following same error:
E: Sub-process /usr/bin/dpkg returned an error code (2)
 
Old 03-28-2016, 11:30 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
I've found a few reports online of this problem:
http://askubuntu.com/questions/60329...x-dpkg-error-2
http://askubuntu.com/questions/59185...n-error-code-2

It might be worth a shot to simply run "sudo dpkg --configure -a", since yours isn't printing any particular package name that's causing the problem. I would wait for more feedback from Ubuntu users though.
 
Old 03-28-2016, 12:29 PM   #5
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest, has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,093
Blog Entries: 2

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
Sometimes
Code:
sudo apt-get autoclean
works?
 
Old 03-28-2016, 02:08 PM   #6
akshay225
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes,
sudo apt-get autoclean works.

Reading package lists... Done
Building dependency tree
Reading state information... Done
 
Old 03-28-2016, 02:49 PM   #7
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest, has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,093
Blog Entries: 2

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
So did that fix it as to use "Thread Tools" towards the top of this page for marking this "solved?"

Also, if you use code tags we can see your data better (can click the quote icon then change [QUOTE] to [code]code[/code] x2...)
 
Old 03-28-2016, 04:34 PM   #8
akshay225
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
only that code works...
I still cannot upgrade or install anything
 
Old 03-28-2016, 04:40 PM   #9
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest, has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,093
Blog Entries: 2

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
The links Suicidaleggroll gave should work if not look in /etc/apt/sources.list ?
 
Old 03-28-2016, 04:45 PM   #10
hydrurga
Senior Member
 
Registered: Nov 2008
Distribution: Linux Mint 18 MATE
Posts: 1,209

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
What results do you get from:

Code:
sudo apt-get check
and

Code:
dpkg -C
 
Old 03-28-2016, 10:28 PM   #11
WarumLinuxBesserIst
LQ Newbie
 
Registered: Mar 2016
Location: Germany
Distribution: Ubuntu
Posts: 2

Rep: Reputation: Disabled
Try this command:

Code:
sudo dpkg --configure -a
then:
Code:
sudo apt update
sudo apt install chromium-browser
Additional:
Since how many years, in Ubuntu you can use apt, not apt-get with better feedback and less characters to type :-)
 
Old 03-31-2016, 10:21 AM   #12
akshay225
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
@ WarumLinuxBesserIst I tried your code. still getting error.
E: Sub-process /usr/bin/dpkg returned an error code (2


@hydrurga For
My output is
Reading package lists... Done
Building dependency tree
Reading state information... Done
and for dpkg -C: NO output:
akshay@akshay-Ub:~$ dpkg -C
akshay@akshay-Ub:~$ dpkg -C


@jamison20000e, the links Suicidaleggroll gave is not working for my case.
I went into /etc/apt/sources.list, but I don't know what to do there. Everything seems perfect.

When I try to install chromium, it downloads it completely, then it reads the package. After reading 60%, the error pops up.
 
Old 03-31-2016, 12:44 PM   #13
akshay225
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you guys.
I reinstalled ubuntu, and now everything is working fine.
 
Old 03-31-2016, 05:48 PM   #14
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: Oregon, USA
Distribution: Lubuntu 14.04, Windows Vista
Posts: 5,158
Blog Entries: 3

Rep: Reputation: 691Reputation: 691Reputation: 691Reputation: 691Reputation: 691Reputation: 691
Quote:
Originally Posted by akshay225 View Post
Thank you guys.
I reinstalled ubuntu, and now everything is working fine.
Good to hear. If you would, please mark this thread as "SOLVED" by clicking on "Thread Tools" directly above your initial post. Thanks!

Regards...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Install Third Party Software in Ubuntu Software Center LXer Syndicated Linux News 0 09-04-2013 12:50 AM
LXer: Ubuntu After Install - Automated installation of useful extra software on Ubuntu LXer Syndicated Linux News 1 04-08-2013 10:12 PM
[SOLVED] Failure to install ordinary software from Ubuntu 10.04 Software Center jlavik Linux - Newbie 1 10-01-2010 10:50 PM
cant install Linux multi media software on ubuntu hardy heron ubuntu 8.0.4 gnome Jazz44 Linux - General 3 09-15-2008 11:17 AM


All times are GMT -5. The time now is 02:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration