Hey there - SQL is important to a lot of different programs for function and is considered a dependency to other critical applications as well.. When 'disabling' something, it's always wiser to start with a configuration option over an uninstall/remove if you're not yet sure how intertwined a program is with other subsystems.. *ALWAYS* check to see the 'fine print' to see what packages would be Removed or Replaced when installing or removing packages.. We've all done it at some point!
That said, you can try a few recovery methods. I'll provide two.
1.) Check your 'apt' logs which should be in /var/log/apt and open the history.log file (the one with the most recent timestamp) to view what got removed. Then comes the somewhat tedious process of reinstalling everything that was removed.
From the terminal:
Code:
## view what logs exist:
$ ls -la /var/log/apt
## Show the history of what got deleted/removed:
$ cat /var/log/apt/history.log
Code:
## The last entry should be the most recent, and look something like:
...
Start-Date: 2011-05-07 15:12:18
Upgrade: ubuntuone-client:i386 (1.4.6-0ubuntu2, 1.4.6-0ubuntu3), ubuntuone-client-gnome:i386 (1.4.6-0ubuntu2, 1.4.6-0ubuntu3), libsyncdaemon-1.0-1:i386 (1.4.6-0ubuntu2, 1.4.6-0ubuntu3), xdg-utils:i386 (1.0.2+cvs20100307-1ubuntu0.2, 1.0.2+cvs20100307-1ubuntu0.3), python-ubuntuone-client:i386 (1.4.6-0ubuntu2, 1.4.6-0ubuntu3), php5-cli:i386 (5.3.3-1ubuntu9.4, 5.3.3-1ubuntu9.5), php5-common:i386 (5.3.3-1ubuntu9.4, 5.3.3-1ubuntu9.5)
End-Date: 2011-05-07 15:14:28
Start-Date: 2011-05-09 21:32:38
Install: earth3d:i386 (1.0.5-1.1ubuntu1)
End-Date: 2011-05-09 21:33:06
Start-Date: 2011-05-09 22:07:36
Remove: earth3d:i386 (1.0.5-1.1ubuntu1)
End-Date: 2011-05-09 22:07:51
Start-Date: 2011-05-11 09:02:27
Upgrade: postfix:i386 (2.7.1-1ubuntu0.1, 2.7.1-1ubuntu0.2), ubuntu-sso-client:i386 (1.0.8-0ubuntu1, 1.0.9-0ubuntu1)
End-Date: 2011-05-11 09:03:31
tofue@Ectonut:/var/log/apt$
The entries that say "Remove" are what you want to look at, and you can even filter them in your results by using grep:
Code:
$ cat /var/log/apt/history.log | grep remove
but you may not get all of the data you need - grep shows the first line of what you're filtering.. You may have to pen & paper it, and pipe through 'less' instead if you're in cli mode (Command Line Interface; non desktop mode) so you can scroll through the results.
Code:
## you can invoke 'less' directly:
$ less /var/log/apt/history.log
## or you can pipe data stream results into less:
$ cat /var/log/apt/history.log | less
## FYI: the end result is the same, but you can manipulate complex scripts by piping, having independent operations perform before results are 'simply' shown or routed to other programs.. cool stuff!
The name of the package is going to be to the left of the architecture type.. so for
Start-Date: 2011-05-09 22:07:36
Remove: earth3d:i386 (1.0.5-1.1ubuntu1)
End-Date: 2011-05-09 22:07:51
the entry "earth3d:i386" has the format <PACKAGE_NAME>:<ARCH_TYPE>, so the package in earth3d:i386 is "earth3d".
Go ahead and reinstall the missing packages that were previously and accidentally removed using:
Code:
$ sudo apt-get update
$ sudo apt-get install <PACKAGE-1 PACKAGE-2 PACKAGE-3 ... ...>
## And so on, but without the greater than or less than.. you get it! :p
If you run into errors, you can clean the package cache using
Code:
$ sudo apt-get check
$ sudo apt-get clean
$ sudo apt-get autoclean
Unless you removed the SQL package using the 'purge' option, your user settings for the programs should remain in your $HOME folder (type " ls -la $HOME " without quotes) to verify what data you've generated for what program if you're curious
When everything is finished installing you can type to start the gnome desktop manager, but it would probably be better to simply reboot with If you haven't missed a package, you should be up and running to your previous state, and then can tackle the original issue you had..
2.) If by chance this all seems too confusing, or it gets beyond the point that you can manage what's installed, what's where, and what's involved, you can always reinstall Ubuntu over your old installation, replacing it.. That would be easy if you made a separate /home partition when you installed the first time, and can refer to this thread for those steps: > Click Here <
I hope this all helps you, let us know how it goes and if you need additional thoughts!
~Cheers!
Bookmarks