I always thought that $HOME and ~ were exactly the same and therefore could be used interchangeably. Today, when I tried to install pylibmc, python binding to memcached, on my shared server using ~ gave me an error, but not $HOME . I would like to explain why.
libmemcached is a requirement for pylibmc. I have libmemcached installed under my home directory because I do not have a root on the server. As a result of install pylibmc, I need to make sure that the installation script knows where to find libmemcached.
When executing python setup.py install --with-libmemcached=~ install script works
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall \
-Wstrict-prototypes -fPIC -DUSE_ZLIB -I ~ / include \
-I / usr / local / include / python2.7 -c _pylibmcmodule.c \
-o build / temp.linux-i686-2.7 / _pylibmcmodule.o -fno-strict-aliasing
which gives errors that libmemcached could not be found.
If I go to --with-libmemcached=$HOME , the script runs
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall \
-Wstrict-prototypes -fPIC -DUSE_ZLIB -I / home / waterbotte / include \
-I / usr / local / include / python2.7 -c _pylibmcmodule.c \
-o build / temp.linux-i686-2.7 / _pylibmcmodule.o -fno-strict-aliasing
no problem. The problem seems to be that the tilde is not resolved. But why?
linux bash centos
tamakisquare Jul 20 '12 at 21:45 2012-07-20 21:45
source share