PDA

View Full Version : Apt-get upgrade problems, AGAIN - GRRRR



Cuddles
03-02-2004, 08:54 PM
This is really ticking me off, you do one apt-get upgrade, and "something" always gets messed up...

Last time it was XINE, now its LOGIN...

apt-get upgrade stated it was upgrading xdm, and a whole slew of other things, after it downloaded everything, xdm config screen popped up, stating it can't have two display servers running, I had to choose...

The choices were:
kde
xdm

Considering I have been, and have always used kde, I told it to use kde -=- xdm went through a lot of spewed messages, and some file changes, and when it completed, I was back to my root prompt.

Falling back to my old days in Windows, the sure test of any problems is always a reboot...

NOW -=- I get my debian login screen, but no matter what account I select, and enter the proper password for that account, it goes to a black screen, and then pops back up the debian login screen again...

I can't get into my system now...

Why does this always happen when I do a apt-get upgrade? Isn't that what you are "supposed" to do? I am "seriously" getting a "phobic" reaction to doing anything "upgrading" wise on my system here, at least as far as Linux is concerned.

How do I get back into my system?

what a majority of the packages, xdm included, versions were something like 3.0.3-2 or something like that...

Help, this is starting to become a "useless" OS, if you can't get things to run, or when you do, it crashes when you try and upgrade something.

Thanks in advance,
Cuddles

Markus
03-02-2004, 09:01 PM
NOW -=- I get my debian login screen, but no matter what account I select, and enter the proper password for that account, it goes to a black screen, and then pops back up the debian login screen again...
Just to ask the obvious, did you choose kde3 at the login screen?

I noticed that when I upgraded and chose kdm instead of xdm, I still had to manually delete new xdm lines from the rc levels, go figure.

rickenbacherus
03-03-2004, 12:29 AM
Why does this always happen when I do a apt-get upgrade? Isn't that what you are "supposed" to do?

For what it's worth, I almost never do apt-get upgrade. I'm not clear if you're getting the KDM login or not. If not simply do:

dpkg-reconfigure kdm

dewd
03-03-2004, 03:06 AM
It happened to me also.

But it was kind of suicide anyway.

When I installed Knoppix 3.4 I was able to apt-get upgrade just fine. Two weeks later apt-get -s upgrade would show a huge list of upgrades. I knew something could break. It didn't complete. Then I tried apt-get dist-upgrade and that was it. KDE no longer had that beautiful menu :) (it was broken) But it was just the kind of push for me to try my home distro called Kurumin, which is based on Knoppix.

I am not going to apt-get upgrade very soon, as everything in my distro is translated to portuguese and I would not like to risk losing that :) and I want it to last a little longer too.

Bottom line is: apt-get upgrade coupled with the bleeding edge nature of Knoppix's packages is a rollercoaster. :) Truth be said ?

A. Jorge Garcia
03-03-2004, 03:28 AM
I never apt-get upgrade anymore. I only apt-get update....

Regards,
AJG

Cuddles
03-03-2004, 04:15 AM
Markus -=- Do I feel stupid - that was it - but I have always used <default> in that area, it never occurred to me that another display manager would change what a "default" setting would be - thanks.

Rickenbacherus -=- Thanks for the info - I'm going to have to write that down for future referance, in case "something" else happens in the future.

A. Jorge Garcia - Sounds good to me - but what do you do when your "not upgraded" numbers climb so high? I usually wait till I hit 300, now I think I am going to wait till I hit 500, before I do an apt-get upgrade. What do you do?

Thanks for the "stupid" persons mistake, and for the answers...
Oh, by the way, while I have a few people here, and we are on the subject... Considering that when I do an apt-get upgrade, I usually get about 1/3 of them "kept back", what do you do about those as well?????

Thanks,
Cuddles
[ apt-get upgrade is like schizophrenia for your computer ][/i]

fingers99
03-03-2004, 04:24 AM
I don't use apt-get upgrade.

I run apt-get update and then upgrade anything I'm not happy with through Synaptic, carefully checking to see if anything else is likely to get blitzed in the process.

Stephen
03-03-2004, 05:42 AM
Oh, by the way, while I have a few people here, and we are on the subject... Considering that when I do an apt-get upgrade, I usually get about 1/3 of them "kept back", what do you do about those as well?????

Thanks,
Cuddles
[ apt-get upgrade is like schizophrenia for your computer ][/i]

The best way I have found of doing it is this. Start with apt-cache show package for a package being held back see what it does and if you are not going to need it then apt-get -s --purge remove package note if it is going to remove half the system if so leave it alone, if it only going to remove a few packages use the show command on them see if you need them if not they go along with it. Keep repeating to you have only packages that you want/need upgraded. Then you would start with a single package from the list remaining and simulate an install if it installs then and another package from the list on the end of the simulated line keep adding until you find a package that wants an additional package that will not install you remove that from the line and install the ones that will. Then you get the package that would not install on a simulated install again and look at the packages it wants and add them to the line like this apt-get -s install package package2/unstable package3/unstable .... because it is usually a package from unstable it needs to install when it will install without errors do it then do an apt-get upgrade and sometimes all the packages that were being help up will install if there are leftovers then you repeat the process above until they will all install. Sometimes the /unstable will not work on the end of the package for the problem ones and you will need the exact version number to tell apt to use then you use apt-cache policy to find the number you need then add to it an example here if I wanted kopete for the KDE 3.2 I am running instead of the version from unstable it wants to install.



HappyTux:/home/stephen# apt-cache policy kopete
kopete:
Installed: (none)
Candidate: 0.7.4-2
Version Table:
4:3.2.0-0+cvs20040217+cm 0
500 http://ftp.snt.utwente.nl unstable/ Packages
4:3.2.0-0pre1v1 0
1 http://ftp.debian.org ../project/experimental/main Packages
0.7.4-2 0
600 http://ftp2.de.debian.org unstable/main Packages
HappyTux:/home/stephen# apt-get -s install kopete
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
kopete (0.7.4-2)
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Inst kopete (0.7.4-2 Debian:unstable)
Conf kopete (0.7.4-2 Debian:unstable)

HappyTux:/home/stephen# apt-get -s install kopete=4:3.2.0-0+cvs20040217+cm
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
kopete (3.2.0-0+cvs20040217+cm)
libgadu3 (1.4-2)
The following NEW packages will be installed:
kopete (3.2.0-0+cvs20040217+cm)
libgadu3 (1.4-2)
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Inst libgadu3 (1:1.4-2 Debian:testing)
Inst kopete (4:3.2.0-0+cvs20040217+cm ftp.snt.utwente.nl)
Conf libgadu3 (1:1.4-2 Debian:testing)
Conf kopete (4:3.2.0-0+cvs20040217+cm ftp.snt.utwente.nl)


So then your command for the install could be like this apt-get install package package=4.20-1 package2/unstable or all the extra packages can have the =1234 on them if needed. Once all your packages have been installed with none being held back you done obvisouly and the headache of seeing all them packages not upgraded will be gone, your upgades depending on how often you do them (say every few days) should be minor with only a few packages being installed at once.

Something you may want to make your life with apt easier is add some aliases if you have already not done so to your /root/.bashrc like these I use.


# Some aliases added by me for convience
alias agi="apt-get install"
alias agis="apt-get -s install"
alias agit="apt-get install -t unstable"
alias agist="apt-get install -s -t unstable"
alias acp="apt-cache policy"
alias acs="apt-cache search"
alias acsh="apt-cache show"
alias acsp="apt-cache showpkg"
alias agr="apt-get remove --purge"
alias agrs="apt-get -s remove"
alias agu="apt-get upgrade"
alias agus="apt-get -s upgrade"
alias agd="apt-get dist-upgrade"
alias agds="apt-get -s dist-upgrade"
alias ag="apt-get update"
alias asv="apt-show-versions"
alias asva="apt-show-versions -a"
alias dpg="dpkg -l | grep"
alias dpp="dpkg -p"
alias dpl="dpkg -L"
alias dks="dpkg -S"
alias dpgc="COLUMNS=200 dpkg -l | grep"
alias ds="dselect update"


Then on the command to simulate an install I only have to type this you of course can call them whatever you want but it is usually best to type the alias in the shell first and make sure you get a command not found error to make sure you are not going to be using another program's name.


HappyTux:/home/stephen# agis kopete
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
kopete (0.7.4-2)
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Inst kopete (0.7.4-2 Debian:unstable)
Conf kopete (0.7.4-2 Debian:unstable)


It saves typos and all kinds of typing you would have to do, in the shell when you added the aliases use source /root/.bashrc the first time after adding them to re-read the .bashrc every other time when you login they will be available.

A. Jorge Garcia
03-03-2004, 02:23 PM
Well, what I do is try out the latest ISO each month. When I get an ISO I like (not the first ISO in a new series which tends to be buggy), then I decide if I want to reinstall my hdds.

After a reinstall, then I do apt-get update until a new reinstall. I'll reinstall my clients 2-4 times a year and my server once or twice. Am I missing much do this and not using apt-get upgrade?

TIA,
AJG

Markus
03-03-2004, 10:58 PM
Cuddles, don't worry!
When it happened to me, I tried about four times to log in, rebooted and tried a couple of times again before selecting kde3 just for the hell of it :D

I suppose dewd is right about apt breaking things now and then being the price to pay for running something called unstable.
I do an upgrade about twice a month and more often than not something breaks or at the least tries to.
Never seem to get the amount of packages held back to climb over ca. 80 though.

nmcphillips
03-03-2004, 11:12 PM
I experienced the same thing Cuddles as did a few others. We posted it at http://www.knoppix.net/forum/viewtopic.php?t=8382 but never really got an answer. I am glad to finally see an explanation. I agree with Markus about this being the price for running unstable. I myself switched to debian/woody, there is something to be said for stability and dependability.

Cuddles
03-04-2004, 03:31 AM
Hmmmmm, starting from newest to oldest posts...

First, Glad to see Knoppix.Net back alive again -=- I got "topic repliy notifications" through my email, but all day today, had no luck getting to the site -=- You never know how much you use/need something, until you don't have it... ( and, besides, I always get "withdrawl" symtoms if I can't get my "daily fix" of this forum :D ) -=- Glad to see it back (whoever you are :!:)

Nmcphillips and Markus, I don't think its "knoppix's" fault, really. I think its the simple fact that: "A person decides to either want, or doesn't know how to change it, to remain on the 'edge' with using the testing, experimental, or unstable, versions as they become available." I am quite sure that a majority of my problems are stemming from the fact that in my 'sources.list' I allow these packages to be "seen", and thus, Knoppix is only doing what I asked of it... If my sources.list has entries for 'give me the newest thing out there', it is doing what it is being asked to do. From what I know, just don't know how to do it, my sources.list states to look for 'unstable', 'testing', 'experimental', etc... packages. I am sure that if you took a distro like "woody", added 'unstable', 'testing', and 'experimental' to your sources.list - in no time, you would be in the same boat as someone who doesn't change the sources.list (like myself) from a Knoppix install. (my bad)

A. Jorge Garcia, I like your idea. So, considering that I am at v3.3, I would do a apt-get dist-upgrade to get to v3.4 - which I hear has hit the world already? (did I understand your theory correctly?) -=- I realize that v3.3 is old news now, but in the world of Windows - you didn't call upon the "Great God Of Microsoft" to do any "Windows" upgrades as far as your OS was concerned, unless, your life depended on it - no one deserves to deal with that hell, unless those conditions were necessary. -=- I am not sure what to do here. I hate to have all the hell that breaks loose when I do a apt-get upgrade, but, don't want to miss new things untill a new version of the complete OS comes out. I think I might take a combination of what Stephen stated, and you did... View what "would" be upgraded, decide if I need it, or wait till a new version comes out... (?)

Stephen, OH HOW COOL :!: "pointers!", or I guess they would be called "remote 'links'" in a Windows world (?) ALIASES - never thought of it... You would create this as a text file right? And the placement of this file would be under the /root/ home directory, under a folder [dot]bashrc ??? Do I add it to a specific "existing" file, or create my own? I am missing your statement, or explaination, on this somewhat though -=- it only runs every-other time??? (btw - I like your "Sherlock Holmes" way of dealing with upgrades, and very well explained, but, in practice, its kind of hard to always do it though - in my case, and what usually gets me into this trouble is, I take the "quick and dirty" FAST way out. It is only after I do the upgrade do I pay the price for my "easy way out"...

This whole "scare" of this past upgrade was simply because, I never realized that when xdm installed, it added a "new" display server to my list on logins - thus my <default> that I always used, was no longer a valid deafult, I needed to choose. I just didn't realize what had changed, or how it had changed on me. I know now. (DUH :!:)

Thanks for this forum, for if not, I am sure I would have sat at the login screen wondering what I had done, or how I would get 2.x gig of OS back after the upgrade - never realizing that it was simply another option on the login screen...

Cuddles

aay
03-04-2004, 03:55 AM
This is bizarre. I do apt-get upgrade quite frequently and really never have problems. What gives? I usually stick with old config files if a packages wants to replace them.

Ok I'll have to admit that I did have the same problem with X that Cudles had when upgrding to KDE 3.2. I fixed it by uncommenting "set e" from /etc/X11/Xsession. Of course I wouldn't have had this problem if I hadn't gone out of my way to add 3.2 before it got put in unstable (Though I can't tell if the same thing would have happened afterward or not).

Adam

Markus
03-04-2004, 08:04 AM
I seem to have been a bit unclear (again).
I don't blame Knoppix, I like it immensely having used Mandrake and Suse in the past. Having a bit of trouble once in a while is really a price I'm willing to pay, at least for now. Perhaps when I tire of fixing things, I'll change to woody or sarge, but for the time being unstable is a great way of getting to know debians little quirks. Each time I have to fix a small thing, and the bugs are usually smallish, I learn a little.

Stephen
03-04-2004, 09:55 AM
Stephen, OH HOW COOL :!: "pointers!", or I guess they would be called "remote 'links'" in a Windows world (?) ALIASES - never thought of it... You would create this as a text file right? And the placement of this file would be under the /root/ home directory, under a folder [dot]bashrc ??? Do I add it to a specific "existing" file, or create my own? I am missing your statement, or explaination, on this somewhat though -=- it only runs every-other time??? (btw - I like your "Sherlock Holmes" way of dealing with upgrades, and very well explained, but, in practice, its kind of hard to always do it though - in my case, and what usually gets me into this trouble is, I take the "quick and dirty" FAST way out. It is only after I do the upgrade do I pay the price for my "easy way out"...


It is a . file so you either need to create or edit the file that may already exist and the /root/.profile file should already be reading it when you login the command I suggested after the editing is necessary because you made a change to the file and had to re-read to be able to use the new aliases in the current shell any new shell would have the aliases every time after this when you login as root the file should be read as long as the section for this is in the /root/.profile file. I have included both of them this time in case you do not have them.




HappyTux:/home/stephen/archives/deb# cat /root/.profile
# ~/.profile: executed by Bourne-compatible login shells.

# Source the .bashrc if it exists.
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# Set path.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
export PATH

mesg n
HappyTux:/home/stephen/archives/deb# cat /root/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.

export PS1='\h:\w\$ '
umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto -h'
eval `dircolors`
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Allows me to run an X program as root
export XAUTHORITY=/home/stephen/.Xauthority

# Stops bash from overwriting file.
#i.e. bob@sonic:~> cat > todo-list.txt
# bash: todo-list.txt: cannot overwrite existing file
set -o noclobber

# Some aliases added by me for convenience
alias agi="apt-get install"
.... {SNIP}

# Set pager to most for color man pages
PAGER=most ; export $PAGER

#Added to let less view .gz doc files
eval `lesspipe`