Uninstall postgresql on MacOs Lion Mountain - macos

I'm completely new with MacOS X and I'm not underestanding where my system postgresql 9.1.5 is installed. I want to upgrade to 9.2 but I would like to uninstall this default installation before.
When I type in the terminal
$> psql --version
The result is:
psql (PostgreSQL) 9.1.5
but I can not find this installation.

MacOS X does not come with PostgreSQL installed as a server (unless you have OS X Server Edition).
Only the client-side PostgreSQL commands and the libpq library ship with the system. These include the psql command that resides is /usr/bin along with other commands such as pg_dump, pg_restore, createdb... You don't have to remove them, and if you did, it's not clear anyway what would prevent the next maintenance update of the OS to put them back.
So if you didn't previously install PostgreSQL yourself on this system, going to 9.2 is not an upgrade, it's a fresh install.
There are a number of providers of PostgreSQL packages for Mac OS X: postgres.app, homebrew, fink, macports...
These packages provide both a server and the client tools with the same version than the server, they have distinct installation paths, and they don't overwrite anything in /usr/bin. Once installed, you want to use the commands from the package preferrably to the ones in /usr/bin, which means technically putting them first in your PATH. Each package I've seen comes with a mention on how to do that in its installation instructions.

You don't have to remove the version Apple ships.
I have been using MacPorts to run various custom builds of PostgreSQL on OSX. It takes a little effort to make it "just work" (PATH and PG environment variables) but I never had to remove Apple's copy of Postgres.
I also keep a VM (VirtualBox) of a pretty minimal Debian install with Postgres running. I can do all my testing against the VM with a change of PG variables or JDBC URL. It's not as performant as running on the host but it is really clean for development.

Related

wireshark - install stable and development builds in OS X

How can I install both (at the time of writing) 1.12.5 and 1.99.6 in OS X 10.8.5?
AFAIK Wireshark installs to the kMDItemCFBundleIdentifier path.
For lack of answers I tried the following. I installed the stable release 1.12.5 first and moved the application bundle to the trash, then I installed the dev version 1.99.6 and renamed the app bundle 'Wireshark [dev build]', next moved the older version from the trash to the applications folder. So far both are working. ChmodBPF and wireshark CLI utility launcher didn't changed. I didn't notice any problems in the install scripts, but I might be wrong.

Which path to use for Kyngchaos Postgres?

I am setting up a new Macbook with OSX Yosemite from scratch.
I want to install and use the KyngChaos versions of Postgres, rather than the system version of Postgres. I have downloaded the KyngChaos packages and installed them, without any errors appearing.
However, when I run psql there is nothing on my path.
If I run find it looks as though there are now two Postgres's on the machine, in these directories:
/usr/local/pgsql-9.3/bin/psql
/usr/local/pgsql/bin/psql
So my questions:
Which one is the KyngChaos package and which is system Postgres?
How should I remove the system Postgres?
How should I set my path to use the KyngChaos package?

Uninstalling macports when 'port' doesn't work

I've been trying to install a few dependencies for an application I'm running and I'm worried I might have broken the dev environment. I'm running this program on a MacBook (OSX Tiger, I don't have access to a newer one). MacPorts is officially broken, returning this error when I try and run any command:
sqlite error: near "ADD": syntax error (1) while executing query: ALTER TABLE registry.files ADD COLUMN binary bool
while executing
"registry::open $db_path"
(procedure "mportinit" line 633)
invoked from within
"mportinit ui_options global_options global_variations"
Seeing as this happens on any port __ command, I can't use the standard way of uninstalling MacPorts. However, given that I'm the one who got it in this condition in the first place, I'd rather not root around myself without knowing what I'm doing.
Is this problem fixable? Just in the interests of my own knowledge, does anyone know what exactly could have caused this error or what it actually means in terms of macport's functioning?
How can I (assuming this is necessary/a good idea) thoroughly uninstall macports? I'd rather not have to go through the trouble of reinstalling all my ports afterwards, but it's better than what I've got now.
MacPorts will usually still work on older versions of Mac OS X as the developers do not intentionally break compatibility. MacPorts officially only supports the latest release of Mac OS X and the one before (at the time of this writing this is 10.7 Lion and 10.6 Snow Leopard).
However, according to your report here, the latest MacPorts 2.1.0 upgrade seems to have compatibility problems with Mac OS X 10.4 Tiger. As indicated in the error message above, the older SQLite library version does not seem to understand the ALTER TABLE ... ADD COLUMN syntax used to update the port registry.
For this case, I assume only the upgrade procedure itself is affected and normal operation would work. This procedure is supposed to bring your MacPorts registry to a newer version required for the new features added in this release. Creating a new, empty registry would probably still work. However, this requires a full reinstall of MacPorts and all of your ports.
Please follow the uninstall instructions, but skip the first command as port cannot be executed anymore. This might leave some traces of ports installing to system locations, but in most cases this works fine. Afterwards, install MacPorts from source using the installation instructions in the guide.
This was a bug in MacPorts 2.1.0 that only affected Tiger, that was fixed in 2.1.1. If you are still running 2.0.4, you can "sudo port selfupdate" to 2.1.1 without problems. If you already ran selfupdate while 2.1.0 was out and are thus unable to use any port commands, you can re-run the last disk image installer for Tiger, and then run selfupdate to get to 2.1.1.

Uninstall python 3.2 on mac os x 10.6.7

According to the documentation from python.org, python 3.2 install on mac os requires an upgrade to tcl/tk 8.5.9 (for use of IDLE). In my haste, I have done both. Now my friend told me that python 3 is not recommended yet because only the built-ins and a few modules have been released for 3. The stable one so far is 2.7 (especially if one wants to make extensive use of a variety of modules). My machine has both 2.6.1 and 3.2 (because some OS services make use of 2.6.1 that comes as default with the OS).
1. How do i remove 3.2 completely to avoid any compatibility issues?
tcl/tk 8.5.9 was also installed and this is not the default. There was no verbose mode during installation, so I don't know whether it replaced the default one. If it did how bad can it be for the OS? and hence
2. If the above is really bad, how do i downgrade to the old version of tcl/tk?
In short, how do i bring my machine back to its original state? If anyone knows all the paths to the directories and files I can do it manually.
Thanks
Since Python installs using a package manager, you can use Suspicious Package to look at the install script and where everything is installed.
Be aware this is for demonstration purposes only. My environment is OSX 10.6.8 and am uninstalling python-3.2.2-macosx10.6.dmg.
sudo rm -Rfv /Library/Frameworks/Python.framework/ /Applications/Python\ 3.2/
cd /usr/local/bin/
sudo rm -fv 2to3 2to3-3.2 idle3 idle3.2 pydoc3 pydoc3.2 python3 python3-32 python3-config python3.2 python3.2-32 python3.2-config python3.2m python3.2m-config pythonw3 pythonw3-32 pythonw3.2 pythonw3.2-32 /Developer/Documentation/Python/Reference\ Documentation\ 3.2
I did the same (3.2 on a mac 10.6) and:
-Moved both the Python 3.2 folder and the ActiveState ActiveTcl folder from the Applications Folder to the Trash.
-Moved the Python.framework folder from the Library/Frameworks folder to the Trash.
Running System profiler shows only the 2.6 version of Python.
Marcos
just uninstall 3x version of python if you have already installed it. Eclipse has that option when you click "see whats already installed".
Install later 2.7 version. It works for me on my OS X 10.9.2 with Eclipse Juno.

confused about macports

I am using MacBook Pro Mac OS 10.5 with related version of XCode. I am new to this development environment. I am learning macports, and I read information about macports from http://www.macports.org/. But I am still confused what macports is after reading information from this site.
I am previous working on Windows and Linux, could anyone let me know what macports is (in easy words) and what is the similar item on Windows/Linux?
thanks in avdance,
George
macports is a way of getting executables and other compiled code installed on your computer without having to work out the details of compiling/linking each apllication.
It is equivalent to a package manager under Linux and other Unicies. There is no direct equivalent under Windows.
It is just a convenient way to install a lot of *nix soft on your mac book. They are installed separately (not overwriting) from binaries/daemons/libs already installed on your mac (by default in folder /opl/local). Also they are much fresher than those installed on your mac.
For example 10.6 ships with bash 3.2, but after running sudo port install bash, you will get version 4.x (to make it your default shell add /opt/local/bin/bash to file /private/etc/shells, run chsh -s /opt/local/bin/bash and reopen terminal).
Note other os x package managers: fink and homebrew (superuser question)

Resources