LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apt-get update screwed me over (https://www.linuxquestions.org/questions/linux-software-2/apt-get-update-screwed-me-over-411778/)

Red Squirrel 02-04-2006 11:30 PM

apt-get update screwed me over
 
I wanted to upgrade webmin so I typed "apt-get upgrade webmin but it went haywire and upgraded everything, and broke lot of stuff, now mysql wont start anymore. I get this error:

Code:

borg:~# /etc/init.d/mysql start
Starting MySQL database server: mysqld...failed.
        Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
borg:~#

To make things worse, webmin never upgraded either :/ I still get an error that I'm using an old version if I try to download modules.

Managed to fix it, I decided I should double check the syslog to see if there may be something I missed and sure enough I did, I had to remove old_passwords=0 somewhere so I did a grep through my whole system to find it. Still unsure why it went haywire when I tried to upgrade webmin though.

btmiller 02-05-2006 12:07 AM

Check the man page -- upgrade did just what it says it will do, upgrade every package on the system for which a newer version exists. I usually use apt-get install <package> to upgrade just a single package -- despite the install argument it actually will upgrade (or at least it used to, haven't done it in awhile). There's probably a better way but I'm not a Debian junky and thus not that proficient with apt.

haertig 02-05-2006 01:24 AM

"apt-get upgrade" will upgrade every package just as btmiller said. If you pass it the name of only a single thing you want upgraded it will ignore that, as the upgrade option does NOT accept a package name. But before it actually does the upgrade, it tells you what it is going to upgrade and prompts you with a "Do you want to continue? (Y/n)" prompt. Did you say "yes" to this prompt, or are you saying it upgraded blindly without your consent?

I have also added the package "apt-get-listbugs" or something like that (I'm not on my Debian box at the moment to verify the exact package name). This is nice because it lists bug reports for things you are going to install and gives you an additional chance to back out of the upgrade/install.

BittaBrotha 02-05-2006 01:45 AM

But before it actually does the upgrade, it tells you what it is going to upgrade and prompts you with a "Do you want to continue? (Y/n)" prompt. Did you say "yes" to this prompt, or are you saying it upgraded blindly without your consent?

Also it will let you see what it will 'Remove'. Always pay close attention when you do apt-get upgrade to things it may want to remove. Sometimes it will replace older ver with newer ver when it show what it will remove.

Red Squirrel 02-05-2006 11:44 AM

Hmmm I did get a couple prompts but it was after it upgraded a bunch of other packages, so figured since it started, it's probably safer to just say yes then to have stuff half upgraded.

apt-get install wont work since it just tells me the package already exists and exits.

berbae 02-05-2006 11:58 AM

I think the command to upgrade one package is:
Code:

apt-get --reinstall install <package>
Read man apt-get:
Quote:

--reinstall
Re-Install packages that are already installed and at
the newest version. Configuration Item: APT::Get::Re*
Install.


All times are GMT -5. The time now is 04:50 PM.