RSS | Comments RSS | Atom


jhcore.com

A source for news, reviews, guides, and tools for technology by John Paulett.

Guides


Guides03 Feb 2008 05:28 pm

I always forget how to build Python packages, such as psyco and simplejson that require C/C++ code to be compiled. The usual error I get from running “python setup.py install” is:

error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing “-c mingw32″ to setup.py.

Now, I do not have Visual Studio 2003, but I do have mingw32. (Grab cygwin and when selecting packages, make sure than mingw-runtime and gcc are selected.)

Now, back with our setup.py file, execute:

python setup.py build_ext --compiler=mingw32 install

Hopefully that should solve any issues.

Guides02 Feb 2008 02:56 pm

To use Perl’s CPAN on Windows with cygwin, you need to install some additional programs in cygwin. Run cygwin’s setup.exe (I like clicking the “View” button to change the listing to Full, so I get an alphabetical list of the packages).

Make sure that you install the following packages:

  • perl (just in case you do not have it)
  • gzip
  • tar
  • unzip
  • make
  • lynx
  • wget
  • ncftp
  • gnupg

Open the Cygwin bash shell and enter:

perl -MCPAN -e shell

Accept the defaults, and you are good to go.

Once in the CPAN shell, you can install modules with commands like:

install Date::Parse
Guides & Ubuntu24 Dec 2007 01:51 am

I have eagerly been waiting to try out CouchDB. I find the concept of document storage, instead of strict relational storage, to be very interesting. Plus, Erlang seems to be gaining mindshare.


I documented the process that I took to install CouchDB 0.7.2 on Ubuntu 7.10 (it is basically straight from with the CouchDB wiki, but with some small modifications to get it to work).

wget http://couchdb.googlecode.com/files/couchdb-0.7.2.tar.gz
tar -xzvf couchdb-0.7.2.tar.gz
cd couchdb-0.7.2/
sudo apt-get install automake autoconf libtool subversion-tools help2man build-essential erlang libicu36 libicu36-dev libreadline5-dev checkinstall
./configure
make
sudo checkinstall

Everything should be looking good.

We need to add a user and give that user permission to some directories.

sudo adduser couchdb
sudo mkdir -p /usr/local/var/lib/couchdb
sudo chown -R couchdb /usr/local/var/lib/couchdb
sudo mkdir -p /usr/local/var/log/couchdb
sudo chown -R couchdb /usr/local/var/log/couchdb
sudo mkdir -p /usr/local/var/run
sudo chown -R couchdb /usr/local/var/run

You can run in a shell:

sudo -u couchdb couchdb

Or you can start the daemon:

sudo /usr/local/etc/init.d/couchdb start

To access to web view of the database, assuming you are running locally, go to:
http://localhost:5984/_utils/index.html

Stay tuned for some CouchDB programming…

Guides & Ubuntu & Virtual Machine06 Jun 2007 04:01 pm

VirtualBox 1.4.0 was released yesterday, so I thought I would write a very quick guide to installing it in Ubuntu Feisty. My previous post detailed downloading the file directly and several troubleshooting steps. If you run into a problem, check that post out.

Add VirtualBox Repository
Open up /etc/apt/sources.list (with sudo gedit) and add this line:

deb http://www.virtualbox.org/debian feisty non-free

Add the VirtualBox Public Key

wget http://www.virtualbox.org/debian/innotek.asc
sudo apt-key add innotek.asc

Update Apt and Install

sudo apt-get update
sudo apt-get install virtualbox

If you already installed VirtualBox, you may just need a simple

sudo apt-get upgrade

after adding the repo and updating apt.

Troubleshooting
If you run into a error when starting VirtualBox, execute a quick:

sudo /etc/init.d/vboxdrv setup

and everything should be fine.

Again, look at the previous post if you have a problem.

Guides & Ubuntu04 Jun 2007 08:46 pm

Sure, there are some posts on the Ubuntu Forums with links on how to install a deb package of Pidgin from some untrusted repository. Personally, I’m not too thrilled about using a package that hasn’t gone through the community process of being added to Ubuntu. So I have two goals:

  1. Install Pidgin
  2. Show you how to install something from source

Don’t be afraid by that last point–a few months ago I was too, but there is no reason to be afraid, because in 7 commands/15 minutes you are going to have Pidgin on your system.

Get the dependencies:
Compiling from source does not get all the dependencies like apt-get does, but luckily I will tell you. From the command line type:

sudo apt-get install libgtk2.0-dev libxml2-dev gettext libnss-dev libnspr-dev

Additionally, if you want spell checking, include libgtkspell-dev in that list.

Get the source:
In my case 2.0.1 was the latest code, so check out the download page just to make sure. If there is a newer version, download that source version and skip this step:

wget http://easynews.dl.sourceforge.net/sourceforge/pidgin/pidgin-2.0.1.tar.bz2

Now unpack it:

tar xvfj pidgin-2.0.1.tar.bz2

cd pidgin-2.0.1

Configure and Install
Now the part that will take a few minutes between each command.

./configure
make
sudo make install

Congrats
You installed the latest IM client! Now, you have to remember that it is your responsibility to reinstall anytime a newer version comes out, apt-get will not do it for you. So do this until Ubuntu backports Pidgin or until you upgrade to Gutsy Gibbon.

Troubleshooting:

If you you get an error message like:

configure: error:

You must have the GTK+ 2.0 development headers installed to compile Pidgin.
If you only want to build Finch then specify --disable-gtkui when running configure.

then make sure you installed the dependencies:

sudo apt-get install libgtk2.0-dev

Or if you get:

configure: error:

You must have libxml2 >= 2.6.0 development headers installed to build.

Same thing, install the dependencies:

sudo apt-get install libxml2-dev

Thanks to amosharper for catching this one:

configure: error:

The msgfmt command is required to build libpurple.  If it is installed on your system, ensure that it is in your path.  If it is not, install GNU gettext to continue.

Again, install the dependencies:

sudo apt-get install gettext

Additionally, if you are getting a warning at the end of configuration that MSN and Google will not work, or if they simple do not work, make sure you have the last two dependencies:

SSL Library/Libraries......... : None (MSN and Google Talk will not work
without SSL!)

Again, install the dependencies:

sudo apt-get install libnss-dev libnspr-dev

Do you want spell checking? If so, you should install libgtkspell-dev with apt-get, then rerun the configure/make/sudo make install.

Next Page »