Showing posts from August, 2011

Design Secrets for engineers

mysqld will not start-problem with /tmp/mysql.sock

My solution to the [ERROR] Can't start server : Bind on unix socket: Permission denied
problem was to change ownership of the directories:

sudo chown -R _mysql /usr/local/var/run/mysqld


SSH tips

python 2.6 on debian lenny


Debian 5.0 comes with Python 2.5 since there is no newer version available in stable repository yet. So the question becomes how you can install a newer Python on your box. Usual way is to update from sid repository and install python version you need... but it doesn't work that way, unfortunately. You will see the following error:
pycentral rtinstall: installed runtime python2.6 not foundThe only way to get rid of this error is by removing older version of python (please note that updating python 2.5 to latest version will not work).
apt-get remove python2.5-minimal python2.5rm -Rf /usr/bin/python /usr/bin/python2.5 /usr/lib/python2.4 /usr/lib/python2.5 /etc/python2.5add sid repository, e.g. deb sid main, to/etc/apt/sources.listapt-get -y updateapt-get -y install python python-setuptools python-virtualenvcomment out sid repository in /etc/apt/sources.listapt-get -y updateln -s /usr…

Setting up Python, Pip, Virtual Env, Xcode on Mac

Python with Xcode:

I figured it out! The steps look lengthy but it's not that bad at all. Open Xcode 4.In the menu bar, click "File" -> "New" -> "New Project…".Select "Other" under "Mac OS X".Select "External Build System" and click "Next".Enter the product name.For the "Build Tool" field, type in "/usr/local/bin/python3" for Python 3 or "/usr/bin/python" for Python 2 without the quotes and then click "Next".Choose where to save it and click "Create".In the menu bar, click "File" -> "New" -> "New File…".Select "Other" under "Mac OS X".Select "Empty" and click "Next".Navigate to the project folder (it will not work, otherwise), enter the name of the Python file (include the ".py" extension), and click &qu…