Hi Folks,
I installed Ubuntu 7.04 on a PC a few minutes ago and would like to install the package "gramps" on it. Unfortunately however apt-get keeps crashing out with the following error:
ian@flower:~$ sudo apt-get install gramps Password: Reading package lists... Done Building dependency tree Reading state information... Done Recommended packages: graphviz python-reportlab The following NEW packages will be installed gramps 0 upgraded, 1 newly installed, 0 to remove and 103 not upgraded. Need to get 0B/13.4MB of archives. After unpacking 27.2MB of additional disk space will be used. (Reading database ... dpkg: error processing /var/cache/apt/archives/gramps_2.2.6-1ubuntu1_all.deb (--unpack): files list file for package `xcalc' is missing final newline Errors were encountered while processing: /var/cache/apt/archives/gramps_2.2.6-1ubuntu1_all.deb Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) ian@flower:~$
It looks to me like the problem is: "files list file for package `xcalc' is missing final newline" so where do I find the files list file for package `xcalc' so I can add a newline to it?
Best wishes, sagr.
sagr alug1@suffolk-ancestor-genealogy-research.co.uk wrote:
ian@flower:~$ sudo apt-get install gramps
[...]
(Reading database ... dpkg: error processing /var/cache/apt/archives/gramps_2.2.6-1ubuntu1_all.deb (--unpack): files list file for package `xcalc' is missing final newline
[...]
It looks to me like the problem is: "files list file for package `xcalc' is missing final newline" so where do I find the files list file for package `xcalc' so I can add a newline to it?
Probably /var/lib/dpkg/info/xcalc.list
Did your /var get full while installing something? I'd suggest reinstalling xcalc at least.
Hope that helps,
On Fri, 2007-07-20 at 10:06 +0100, MJ Ray wrote:
Probably /var/lib/dpkg/info/xcalc.list
Did your /var get full while installing something? I'd suggest reinstalling xcalc at least.
I think you will get this error when you try to install anything, including trying to reinstall xcalc. Best course of action here would be to replace xcalc.list with a known good copy (which I have just emailed to you off list) or at least compare to your copy and make changes as appropriate.
Then I would do a 'sudo apt-get install --reinstall xcalc' just to be sure.
It's either as MJR says, or a disk/filesystem error or the machine was rebooted whilst it was still installing the ubuntu packages or possibly during an update.
Hope that helps,
On Fri, 2007-07-20 at 12:21 +0100, Wayne Stallwood wrote:
On Fri, 2007-07-20 at 10:06 +0100, MJ Ray wrote:
Probably /var/lib/dpkg/info/xcalc.list
Thanks MJR, yes, it is there.
Did your /var get full while installing something? I'd suggest reinstalling xcalc at least.
Yes, now you mention it, I think there was an error come up about xcalc during installation, but, not understanding what it meant I just clicked on the ok button.
I think you will get this error when you try to install anything, including trying to reinstall xcalc.
Yes, all apt-get actions seem to fail.
Best course of action here would be to replace xcalc.list with a known good copy (which I have just emailed to you off list) or at least compare to your copy and make changes as appropriate.
Then I would do a 'sudo apt-get install --reinstall xcalc' just to be sure.
Thanks; I have received and installed your new file and then done an apt-get reinstall. This seemed to work ok but now when I try to apt-get install gramps I get a similar error message as before but this time mentioning a different file is missing it's newline:
(Reading database ... dpkg: error processing /var/cache/apt/archives/gramps_2.2.6-1ubuntu1_all.deb (--unpack): files list file for package `xcursor-themes' is missing final newline Errors were encountered while processing: /var/cache/apt/archives/gramps_2.2.6-1ubuntu1_all.deb Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1)
It's either as MJR says, or a disk/filesystem error or the machine was rebooted whilst it was still installing the ubuntu packages or possibly during an update.
I am wondering if it was simply my /var filesystem got full up during installation like MJR suggested (the hard disk I have installed it on is quite small (the / partition is only 3GB)).
When doing a "ls" on /var/lib/dpkg/info to look for the xcalc.list file a few minutes ago I noticed that quite a few files were listed in green instead of black. It appears that these green files are set to permission 755 instead of the normal 644 and are mostly (but not all as some are just .prerm) in sets of four with:
.postinst .postrm .preinst .prerm
suffixes instead of sets of two with:
.list .md5sums
suffixes. The question is what to do now. My PC starts and runs ok, and, indeed, if I had not tried to do an apt-get I would be completely unaware anything is wrong. Unfortunately this PC is rather slow (300MHz) with only 128MB RAM and took ages (nearly 4 hours?) to install Ubuntu and I have been happily typing away extensively personalising it since then. I am therefore a bit reluctant to reinstall everything from scratch. I have saved a list of files with the *.p* suffix to a text file but looking at the list can see it contains 392 lines... NOT good news.
I have noticed that Ubuntu keeps telling me there are around 300 packages waiting to be updated online each time it starts up... I have not tried this online update, and haven't got a clue whether or not it would work, but would it be worth a try or would it complicate things? Alternatively I still have the Ubuntu 7.04 "Live CD" from which I originally installed Ubuntu... can I simply copy any files off there onto my hard disk to correct the problem?
Although having a little bit of experience with Linux I haven't much of a clue about Debian/Ubuntu so am unsure of how serious my problem is.
Any suggestions about the best way forward would be appreciated.
sagr.
On 7/21/07, sagr alug1@suffolk-ancestor-genealogy-research.co.uk wrote:
I am wondering if it was simply my /var filesystem got full up during installation like MJR suggested (the hard disk I have installed it on is quite small (the / partition is only 3GB)).
My PC starts and runs ok, and, indeed, if I had not tried to do an apt-get I would be completely unaware anything is wrong. Unfortunately this PC is rather slow (300MHz) with only 128MB RAM and took ages (nearly 4 hours?) to install Ubuntu and I have been happily typing away extensively personalising it since then. I am therefore a bit reluctant to reinstall everything from scratch.
Although having a little bit of experience with Linux I haven't much of a clue about Debian/Ubuntu so am unsure of how serious my problem is.
Any suggestions about the best way forward would be appreciated.
Do you have any more partitions apart from / and swap?
On my Ubuntu 7.04 system I'm using the following amounts of disk: /bin 5MB /boot 183MB /etc 13MB /lib 1766MB /opt 80MB /usr 2605MB /var 454MB
total = 5106MB, or about 5GB
I think you're going to need a bigger disk. How much free space do you have? df
Tim.
On Sat, 2007-07-21 at 08:27 +0100, Tim Green wrote:
Do you have any more partitions apart from / and swap?
Not really, just /home.
On my Ubuntu 7.04 system I'm using the following amounts of disk: /bin 5MB /boot 183MB /etc 13MB /lib 1766MB /opt 80MB /usr 2605MB /var 454MB
total = 5106MB, or about 5GB
I think you're going to need a bigger disk.
Hmmm... Ubuntu said it only required 2.5GB but you may be right.
How much free space do you have? df
ian@flower:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda1 2887108 2168828 571620 80% / varrun 63104 96 63008 1% /var/run varlock 63104 0 63104 0% /var/lock procbususb 63104 72 63032 1% /proc/bus/usb udev 63104 72 63032 1% /dev devshm 63104 0 63104 0% /dev/shm lrm 63104 33788 29316 54% /lib/modules/2.6.20-15-generic/volatile /dev/hda2 460532 12053 423909 3% /home
Perhaps Ubuntu is an overkill for what I need?
I just want a Linux PC onto which I can install the package "gramps" and I know that gramps is availableas an apt-get package for Ubuntu. Could anyone perhaps recommend a more lightweight Distro on which I could easily install gramps if I am unable to get Ubuntu working?
Sagr.
sagr alug1@suffolk-ancestor-genealogy-research.co.uk wrote:
[...] The question is what to do now. My PC starts and runs ok, and, indeed, if I had not tried to do an apt-get I would be completely unaware anything is wrong. Unfortunately this PC is rather slow (300MHz) with only 128MB RAM and took ages (nearly 4 hours?) to install Ubuntu and I have been happily typing away extensively personalising it since then. I am therefore a bit reluctant to reinstall everything from scratch. [...]
I'd get a pen and paper and each time it complains about a missing newline, note the PACKAGENAME and run echo >> /var/lib/dpkg/PACKAGENAME.list then rinse and repeat. Once apt actually runs, I'd reinstall all the packages you've noted.
It would be better to do a full reinstall, but I hate doing that too. If Ubuntu sometimes breaks itself, I'd expect someone to have documented the recovery process, but I can't find it across their 1001 unconnected web sites.
I don't know what Ubuntu's current minimum and recommended specs are, especially with the lardballs of today's Gnome, OpenOffice.org and Mozilla, but I would have expected that PC to be quite OK for running Linux, if a little slowly sometimes.
[...]
Alternatively I still have the Ubuntu 7.04 "Live CD" from which I originally installed Ubuntu... can I simply copy any files off there onto my hard disk to correct the problem?
Depends if it has matching files in a /var/lib/dpkg, or you could try sudo dpkg -i /path/to/xcalc*.deb if you can find the deb packages on the CD and see if dpkg is happy to do that.
Good luck!
On Sun, 2007-07-22 at 12:58 +0100, MJ Ray wrote:
I'd get a pen and paper and each time it complains about a missing newline, note the PACKAGENAME and run echo >> /var/lib/dpkg/PACKAGENAME.list then rinse and repeat. Once apt actually runs, I'd reinstall all the packages you've noted.
Thanks for that very practical tip MJR. Thankfully Ubuntu is now up and running (although I have now encountered a new POP mail problem and a Printer Driver problem - see new topics).
I don't know what Ubuntu's current minimum and recommended specs are, especially with the lardballs of today's Gnome, OpenOffice.org and Mozilla, but I would have expected that PC to be quite OK for running Linux, if a little slowly sometimes.
The speed is good enough for our Family Historians to try out Gramps GeneWeb and LifeLines... maybe if they like these Linux apps enough, but get frustrated by the slow speed at which they run, they will authorise the purchase of a batch of nice new modern PCs for me to play with (Oooops! backspace, backspace delete "play with" insert "evaluate")...
Thank again MJR, Wayne, Peter, Memphi and everyone else who offered very useful responses to this thread to help me get my Linux box up and running!
Sagr.
On Sat, 2007-07-21 at 08:02 +0100, sagr wrote:
The question is what to do now. My PC starts and runs ok, and, indeed, if I had not tried to do an apt-get I would be completely unaware anything is wrong. Unfortunately this PC is rather slow (300MHz) with only 128MB RAM and took ages (nearly 4 hours?) to install Ubuntu and I have been happily typing away extensively personalising it since then. I am therefore a bit reluctant to reinstall everything from scratch.
To be honest I think you are better starting again with a more slimline distribution, everything will work with a broken package database right up until the point you want to install something (with either apt or dpkg) or install security updates etc. You can continue to repair as MJR has suggested but if it was caused by a disk space issue during the installation and given how many packages sit alphabetically after xcursor-themes.list on a default ubuntu installation you may be there some time with your pen and paper.
Or you may get lucky and xcursor-themes.list is the last truncated file. There may be a log of some use in /var/log/installer that will show exactly which package installations failed during the installation, this would help you assess whether it is worth continuing the route of replacing the damaged files.
Part of the problem here is that Ubuntu as you may have noticed has no package installation options during installation so you don't so much get a minimal system as a "default desktop" one which if you are looking at a single purpose machine is overkill. Ubuntu is designed to give you a pretty functional desktop computer (complete with gimp, Open Office, web browsers, Email clients etc) from the outset.
As others have suggested you could look at versions of Ubuntu that have a more lightweight window manager (as with a single purpose computer the window manager is inconsequential anyway) you can add xubuntu to that list, but they are mostly all going to still be bloated in terms of the number of packages installed. Either that or it is time to look at Debian although the installation in terms of hardware detection is not as automated or user friendly (IMO)