lhy
Posts: 2
Joined: Wed Feb 13, 2013 12:55 am

Problem after reinstall Raspberian

Wed Feb 13, 2013 1:00 am

Lately, I have alot of problem with my raspberry pi. In the past month, I have experience that after reboot, the system is totally F**ked up and require to re-install. Today, it is the 6th time of reinstall in 6 weeks. And this time I could not even install packages from the internet. I have got the following message:

Code: Select all


pi@raspberrypi ~/ $ sudo apt-get install tcllib
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  tcllib
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 4,628 kB of archives.
After this operation, 16.5 MB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main tcllib all 1.14-dfsg-3 [4,628 kB]
Fetched 4,628 kB in 2s (1,669 kB/s)
Selecting previously unselected package tcllib.
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libept-dev' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

I hope someone here could tell me more about this. And why I am getting these messed up OS.
I have the 256MB version of model B and is running the latest raspberian of 9th Feb. After each re-install I have to following packages installed from the internet:

Code: Select all

sudo apt-get install tcl8.5-dev
sudo apt-get install tcllib
sudo apt-get install libsqlite3-dev libsqlite3-tcl
Nothing more or less. Thanks for any attempt to help.

User avatar
socialdefect
Posts: 110
Joined: Mon Jun 25, 2012 9:02 pm
Location: Tilburg, the Netherlands
Contact: Website

Re: Problem after reinstall Raspberian

Wed Feb 13, 2013 7:41 am

That does not look like it's your fault.... It's an error in an installed package. Try to run the following commands to try and fix it before installing anything else as I see you are not a fan of doing updates ;)

Refresh the software catalogs:

Code: Select all

sudo apt-get update
Update your installation:

Code: Select all

sudo apt-get dist-upgrade
(You might need to restart if a new kernel has been installed)

If that fixed it check again for updates just to be sure and then install your extra packages.

If you ran into an error try to fix it like this:

Code: Select all

sudo apt-get -f install
not fixed yet??? then try:

Code: Select all

sudo dpkg --configure -a
and then try again to update.

If all the above fails the only thing left is to try and manually remove the package that's causing the error:

Code: Select all

sudo apt-get purge name-error-package
You might even need to use --force:

Code: Select all

sudo dpkg --remove --force-all name-error-package
If this works you can start with the upgrade and -f install commands above one last time. If the error persists I suggest you download a fresh image (or an older one).

Concerning the multiple re-downloads it can be wise to store the downloaded packages on a removable disk. Apt stores those in it's cache dir: /var/cache/apt/archives.

When you finally have a working Pi again I suggest you look into creating backups of your SD card so you don't have to keep installing your customizations over and over again...

Good luck ;)
Last edited by socialdefect on Wed Feb 13, 2013 7:43 am, edited 1 time in total.
== If it's not broke... I'm not done fixing it! ==

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: Problem after reinstall Raspberian

Wed Feb 13, 2013 7:42 am

Could it be a bad SD Card ? have you tried another ?

Overclocking has been known to cause SD Card corruption !
I know everything about nothing"

lhy
Posts: 2
Joined: Wed Feb 13, 2013 12:55 am

Re: Problem after reinstall Raspberian

Wed Feb 13, 2013 3:25 pm

Thank socialdefect for your suggestions, I have tried the first 2 commands of your solution, and seems both are not working. The other commands further in your post, I have tried them already from random google results on my error message. I have no idea what package I should remove that cause this error, because it is a fresh OS image. The first package I tried to install, I got this problem. Here is a snapshot of my attempt to use your solution:

Code: Select all

pi@raspberrypi ~ $     sudo apt-get update
Hit http://archive.raspberrypi.org wheezy InRelease
Get:1 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB]
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Get:2 http://mirrordirector.raspbian.org wheezy/main armhf Packages [7,400 kB]
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:3 http://mirrordirector.raspbian.org wheezy/contrib armhf Packages [23.3 kB]
Get:4 http://mirrordirector.raspbian.org wheezy/non-free armhf Packages [47.8 kB]
Get:5 http://mirrordirector.raspbian.org wheezy/rpi armhf Packages [14 B]
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Fetched 7,483 kB in 1min 1s (122 kB/s)
Reading package lists... Done
pi@raspberrypi ~ $     sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  curl gdb gdbserver libcurl3 libgail-3-0 libgtk-3-0 libgtk-3-bin
  libgtk-3-common libpoppler19 perl perl-base perl-modules poppler-utils
13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 17.1 MB of archives.
After this operation, 5,120 B disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main perl armhf 5.14.2-17+rpi1 [3,661 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main perl-base armhf 5.14.2-17+rpi1 [1,467 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main perl-modules all 5.14.2-17+rpi1 [3,442 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main curl armhf 7.26.0-1+wheezy1 [267 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libcurl3 armhf 7.26.0-1+wheezy1 [314 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgtk-3-bin armhf 3.4.2-6 [54.9 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgail-3-0 armhf 3.4.2-6 [59.1 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgtk-3-0 armhf 3.4.2-6 [1,463 kB]
Get:9 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgtk-3-common all 3.4.2-6 [2,654 kB]
Get:10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpoppler19 armhf 0.18.4-5 [996 kB]
Get:11 http://mirrordirector.raspbian.org/raspbian/ wheezy/main gdbserver armhf 7.4.1+dfsg-0.1 [117 kB]
Get:12 http://mirrordirector.raspbian.org/raspbian/ wheezy/main gdb armhf 7.4.1+dfsg-0.1 [2,478 kB]
Get:13 http://mirrordirector.raspbian.org/raspbian/ wheezy/main poppler-utils armhf 0.18.4-5 [138 kB]
Fetched 17.1 MB in 11s (1,477 kB/s)
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libept-dev' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
Therefore, I think Cloudcentric say that might be my sd is more likely. Altho I dont overclock the RPi I still think there is something with the SD card. I cannot think of which component of the RPi could be broken expect for the removable SD card. So I will keep you guys posted on my further progression.
Thanks for the reply!

Return to “Beginners”