I try install ncurses extensions for php7.0 but I get this error
/bin/bash /tmp/pear/download/ncurses-1.0.2/libtool --mode=compile cc -I. -I/tmp/pear/download/ncurses-1.0.2 -DPHP_ATOM_INC -I/tmp/pear/download/ncurses-1.0.2/include -I/tmp/pear/download/ncurses-1.0.2/main -I/tmp/pear/download/ncurses-1.0.2 -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/download/ncurses-1.0.2/ncurses.c -o ncurses.lo
libtool: compile: cc -I. -I/tmp/pear/download/ncurses-1.0.2 -DPHP_ATOM_INC -I/tmp/pear/download/ncurses-1.0.2/include -I/tmp/pear/download/ncurses-1.0.2/main -I/tmp/pear/download/ncurses-1.0.2 -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/download/ncurses-1.0.2/ncurses.c -fPIC -DPIC -o .libs/ncurses.o
/tmp/pear/download/ncurses-1.0.2/ncurses.c:36:37: error: unknown type name ‘zend_rsrc_list_entry’
static void ncurses_destruct_window(zend_rsrc_list_entry *rsrc TSRMLS_DC)
^
/tmp/pear/download/ncurses-1.0.2/ncurses.c:45:36: error: unknown type name ‘zend_rsrc_list_entry’
static void ncurses_destruct_panel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
^
/tmp/pear/download/ncurses-1.0.2/ncurses.c: In function ‘zm_startup_ncurses’:
/tmp/pear/download/ncurses-1.0.2/ncurses.c:247:57: error: ‘ncurses_destruct_window’ undeclared (first use in this function)
le_ncurses_windows = zend_register_list_destructors_ex(ncurses_destruct_window, NULL, "ncurses_window", module_number);
^
/tmp/pear/download/ncurses-1.0.2/ncurses.c:247:57: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/download/ncurses-1.0.2/ncurses.c:249:56: error: ‘ncurses_destruct_panel’ undeclared (first use in this function)
le_ncurses_panels = zend_register_list_destructors_ex(ncurses_destruct_panel, NULL, "ncurses_panel", module_number);
^
Makefile:194: ошибка выполнения рецепта для цели «ncurses.lo»
make: *** [ncurses.lo] Ошибка 1
ошибка выполнения рецепта для цели «ncurses.lo» is like error in process run target
There is a patch which can be applied against v1.0.2 of ncurses for php to modify it for php 7. Once the patch has been applied, the extension can be built and installed.
Required packages (these are Debian package names):
php-cli
php-pear
php-dev
libncurses5-dev
ncurses-doc
libncursesw5-dev
All following commands assume the user is logged in as root. Packaging commands are specific to Debian. These have been tested under Debian Stretch.
apt-get install php-cli php-pear php-dev libncurses5-dev ncurses-doc libncursesw5-dev
Use pecl to get v1.0.2 of ncurses, and wget to get the patch (as ncurses.patch).
cd /root
pecl download ncurses
mkdir /root/ncurses
cd /root/ncurses
tar -xvzf /root/ncurses-1.0.2.tgz
wget "https://bugs.php.net/patch-display.php?bug_id=71299&patch=ncurses-php7-support-again.patch&revision=1474549490&download=1" -O ncurses.patch
Rename the ncurses-1.0.2 directory to ncurses-php5 because that is the name which the patch expects, and apply the patch.
mv ncurses-1.0.2 ncurses-php5
patch --strip=0 --verbose --ignore-whitespace <ncurses.patch
Build the ncurses extension. This will build the ncurses.so file in /root/ncurses/ncurses-php5/modules.
cd ncurses-php5
phpize
./configure
make
Install the ncurses extension. This will place the ncurses.so file in /usr/lib/php/20151012. This location may differ in other distributions.
make install
Make the ncurses.so extension available to php 7. These file locations may differ in other distributions.
cat <<'EndOfHereDoc' >/etc/php/7.0/mods-available/ncurses.ini
; configuration for php ncurses module
; priority=20
extension=ncurses.so
EndOfHereDoc
ln --symbolic /etc/php/7.0/mods-available/ncurses.ini /etc/php/7.0/cli/conf.d/20-ncurses.ini
Verify that ncurses is indeed available.
php -m | grep ncurses
Once everything is working, the /root/ncurses directory, /root/ncurses-1.0.2.tgz file, and /root/channels.xml file can be removed.
I had the same problem and stumbled upon this topic. Soluthions provided here didn't work for me, but I found another solution, whitch is available here: https://github.com/OOPS-ORG-PHP/mod_ncurses
It is patched and ready to compile.
Just sharing with others that will struggle with this as I did.
I am trying to install Panda on Ubuntu 15.10. First I tried:
git clone --recursive git://github.com/tadzik/panda.git
cd panda
perl6 bootstrap.pl
The last command gives error message:
===SORRY!=== Error while compiling bootstrap.pl
Confused
at bootstrap.pl:3
------> use v6.⏏c;
expecting any of:
statement list
Based on comments from #gfldex (see below), I then ran:
> perl6 --version
This is perl6 version 2014.07 built on parrot 6.6.0 revision 0
So the problem seems that an old version of Perl6 comes with Ubuntu 15.10.
(I installed Perl6 on Ubuntu using sudo apt-get install rakudo.)
I now tried to update my Perl6 to latest version:
wget http://rakudo.org/downloads/star/rakudo-star-2016.01.tar.gz
tar xzf rakudo-star-2016.01.tar.gz
cd rakudo-star-2016.01
perl Configure.pl --backend=moar --gen-moar
make
make install
But the last command fails with:
cd modules/panda && /home/hakon/install_rakudo/rakudo-star-2016.01/install/bin/perl6-m bootstrap.pl
==> Bootstrapping Panda
==> Installing panda from a local directory '/home/hakon/install_rakudo/rakudo-star-2016.01/modules/panda'
==> panda depends on File::Find, Shell::Command, JSON::Fast
==> Shell::Command depends on File::Find
==> Fetching File::Find
==> Building File::Find
==> Testing File::Find
Perl v6.0.0 required--this is only v5.20.2, stopped at lib/File/Find.pm line 1.
BEGIN failed--compilation aborted at lib/File/Find.pm line 1.
Compilation failed in require at /home/hakon/perl5/lib/perl5/App/Prove/State.pm line 6.
BEGIN failed--compilation aborted at /home/hakon/perl5/lib/perl5/App/Prove/State.pm line 6.
Compilation failed in require at /home/hakon/perl5/lib/perl5/App/Prove.pm line 10.
BEGIN failed--compilation aborted at /home/hakon/perl5/lib/perl5/App/Prove.pm line 10.
Compilation failed in require at /home/hakon/perl5/bin/prove line 8.
BEGIN failed--compilation aborted at /home/hakon/perl5/bin/prove line 8.
The spawned process exited unsuccessfully (exit code: 255)
After subsequent input from #gfldex I tried to remove package
rakudo. Maybe the presence of the binary /usr/bin/perl6 would cause confusion for the installer:
> sudo apt-get remove rakudo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libparrot6.6.0 linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic linux-image-4.2.0-16-generic
linux-image-4.2.0-27-generic linux-image-extra-4.2.0-16-generic linux-image-extra-4.2.0-27-generic nqp parrot parrot-minimal
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
rakudo
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
After this operation, 38,8 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 318170 files and directories currently installed.)
Removing rakudo (2014.07-4build1) ...
Processing triggers for man-db (2.7.4-1) ...
Then testing if the package was removed successfully:
> pwd
/home/hakon/install_rakudo/rakudo-star-2016.01
> which perl6
./perl6
> perl6 --version
This is Rakudo version 2016.01.1 built on MoarVM version 2016.01
implementing Perl 6.c.
> cd ..
> perl6 --version
The program 'perl6' is currently not installed. You can install it by typing:
sudo apt-get install rakudo
> cd rakudo-star-2016.01
Then I retried make install, but it fails with exactly the same error message as before.
Then I tried a complete reinstallation:
cd ..
rm -rf rakudo-star-2016.01/
wget http://rakudo.org/downloads/star/rakudo-star-2016.01.tar.gz
tar xzf rakudo-star-2016.01.tar.gz
cd rakudo-star-2016.01
perl Configure.pl --backend=moar --gen-moar
make
make install
But I still get the same error message from make install.
Then I tried reinstalling Panda manually once more
cd ..
git clone --recursive git://github.com/tadzik/panda.git
cd panda
../rakudo-star-2016.01/perl6 bootstrap.pl
But that also fails with the same error message (Perl v6.0.0 required--this is only v5.20.2).
According to user RabidGravy on IRC channel #perl6 on irc.freenode.net:
the problem with installing panda there is due to PERL5LIB or PERLLIB
being set in the environment
So now I tried clearing PERL5LIB before installing:
PERL5LIB= make install
and it worked fine.
And finally, I had to add the following paths to my ~/.bashrc to complete the setup:
/home/hakon/install_rakudo/rakudo-star-2016.01/install/bin
/home/hakon/install_rakudo/rakudo-star-2016.01/install/share/perl6/site/bin
(It would be nice to know why it was necessary to clear PERL5LIB, tough.)
I am getting following error while trying to install httpd 2.0.49 from its source on ubuntu 12.04 machine.
sudo make
...
...
make[4]: Entering directory `/home/satya/httpd-2.0.49/srclib/apr/network_io/unix'
/bin/bash /home/satya/httpd-2.0.49/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -D_REENTRANT -D_GNU_SOURCE -I../../include -I../../include/arch/unix -I../../include/arch/unix -c sockopt.c && touch sockopt.lo
sockopt.c: In function 'apr_socket_opt_set':
sockopt.c:216:27: error: 'SCTP_NODELAY' undeclared (first use in this function)
I installed lksctp by executing sudo apt-get install lksctp-tools command and made few changes as suggested here
Even after doing this I am unable to compile the httpd and getting same error as above.
This is a bug in the configure script which assumes sctp is available even when it is not. This was fixed in later releases of 2.0.
Preferably, you should - if you want 2.0 - compile 2.0.65 instead.
Do however note that 2.0 is EOL (since 2013), so it is not officially supported by Apache anymore.
I am trying to get couchbase up and running for python on Mac OSX 10.6.8. I'm following the instructions here:
http://docs.couchbase.com/couchbase-sdk-python-1.2/index.html#getting-started
But I'm stuck on step 2:
Download and install the C library.
According to the instructions for installing the C SDK here:
http://docs.couchbase.com/developer/c-2.4/download-install.html
I did this:
~$ brew update
....
....
~$ brew install libcouchbase
But I'm getting an error when homebrew tries to install the dependency cmake:
==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --parallel=2 --no-system-libarchiv
==> make
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_write_set_options.c.o
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/filter_fork_posix.c.o
Linking C static library libcmlibarchive.a
[ 34%] Built target cmlibarchive
make: *** [all] Error 2
READ THIS: http://git.io/brew-troubleshooting
These open issues may also help:
Fix LLVM CMake modules not being preprocessed (https://github.com/Homebrew/homebrew/pull/29976)
cmake builds fail on CLT-only with --env=std (https://github.com/Homebrew/homebrew/issues/29101)
More detail here:
~$ brew gist-logs --config --doctor cmake
https://gist.github.com/a37987f168d284128cfe
Anyone have any ideas on what I should do? Thanks.
Do you have the latest (available for 10.6.8) version of Xcode and its devtools? It appears to be an issue with GCC (I initially had issues with the LLVM gcc version Apple packages with Xcode).
Try brew install gcc (or brew reinstall gcc if you initially used brew to install gcc) and then run brew install make again.
I've got XCode version 3.2.6 installed, which I believe is the highest version compatible with OSX 10.6.8.
In the gist, whose link I posted, one of the errors is:
error: ncurses/ncurses.h: No such file or directory
I found ncurses.h on my system here:
/usr/include$ ls -al ncurses.h
lrwxr-xr-x 1 root wheel 8 Aug 11 2012 ncurses.h -> curses.h
...which if you note is not in a directory called ncurses(look at the prompt)--ncurses being the directory where the error message says ncurses.h should be. Also, note that ncurses.h is a link to another file: curses.h (see the arrow on the right?). So, I did this:
/usr/include$ sudo mkdir ncurses
Password:
/usr/include$ cd ncurses
/usr/include/ncurses$ sudo cp -av ../ncurses.h . (-a => copy link rather than the file it points to, -v => verbose, show what is being copied)
Password:
../ncurses.h -> ./ncurses.h
/usr/include/ncurses$ ls -al
total 8
drwxr-xr-x 3 root wheel 102 Dec 29 18:59 .
drwxr-xr-x 272 root wheel 9248 Dec 29 18:13 ..
lrwxr-xr-x 1 root wheel 8 Dec 29 18:59 ncurses.h -> curses.h
Then I tried installing libcouchbase again:
~$ brew install libcouchbase
==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.ta
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.g
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --para
==> make
==> make install
/Users/7stud/.homebrew/Cellar/cmake/3.1.0: 1819 files, 33M, built in 18.5 minutes
==> Installing libcouchbase
==> Downloading http://packages.couchbase.com/clients/c/libcouchbase-2.4.5_1_gd7f6ecf.t
######################################################################## 100.0%
==> Patching
==> cmake .. -DCMAKE_INSTALL_PREFIX=/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_
==> make install
/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf: 53 files, 1.4M, built in 42 seconds
$
I didn't believe it, so I tried again:
~$ brew install libcouchbase
Warning: libcouchbase-2.4.5_1_gd7f6ecf already installed
~$ brew uninstall libcouchbase
Uninstalling /Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf...
~$ brew install libcouchbase
==> Downloading http://packages.couchbase.com/clients/c/libcouchbase-2.4.5_1_gd7f6ecf.t
Already downloaded: /Library/Caches/Homebrew/libcouchbase-2.4.5_1_gd7f6ecf.tar.gz
==> Patching
==> cmake .. -DCMAKE_INSTALL_PREFIX=/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_
==> make install
/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf: 53 files, 1.4M, built in 30 seconds
~$
Testing the install:
/usr/include/ncurses$ cbc version
cbc:
Runtime: Version=2.4.5_1_gd7f6ecf, Changeset=d7f6ecfa15e73c668a8f81947d9f85b654dcdbda
Headers: Version=2.4.5_1_gd7f6ecf, Changeset=d7f6ecfa15e73c668a8f81947d9f85b654dcdbda
IO: Default=libevent, Current=libevent
SSL: .. SUPPORTED
Python SDK
But then I was unable to install the Python SDK following the instructions here:
http://docs.couchbase.com/couchbase-sdk-python-1.2/
$ python -V
Python 2.7.9
I got to here:
5. Install the Python SDK. The easiest way to do this is via the pip tool:
shell> pip install couchbase --quiet
But this is what happened:
$ pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-eflT9C-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9,
in
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/init.py",
line 148, in main
return command.main(args[1:], options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py",
line 169, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 63: ordinal not in range(128)
Same thing here:
$ LC_ALL=C pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-Oe6ydu-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Storing complete log in /Users/7stud/.pip/pip.log
/usr/include/ncurses$ pip install couchbase --quiet Command
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-GijsbQ-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9,
in
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/init.py",
line 148, in main
return command.main(args[1:], options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py",
line 169, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 63: ordinal not in range(128)
I fixed the unicode error by patching the python source code:
#text = '\n'.join(complete_log)
#python 2.x patch found here: https://github.com/pypa/pip/issues/1137
text = '\n'.join(to_utf8(l) for l in complete_log)
But then I got this error:
$ pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-AQtdf2-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Storing complete log in /Users/7stud/.pip/pip.log
$
(I just looked at the error log mentioned above: pip.log, and it says the error was a KeyboardInterrupt. Huh? So, I tried $ pip install couchbase --quiet again and it worked. Then, to test the install $ python -c 'import couchbase', and there were no errors! I don't know if the stuff I did below influenced anything.)
Next, I decided to try installing from source:
According to the README file:
~/Downloads/couchbase-1.2.4$ python setup.py build_ext --inplace
But that ended like this:
src/exceptions.c:136: error: too many arguments to function
‘pycbc_exc_map’ lipo: can't figure out the architecture type of:
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-//ccZekvJj.out error:
command 'gcc-4.2' failed with exit status 1
Next, I did this:
~/Downloads/couchbase-1.2.4$ python setup.py build_ext \
> --library-dir ~/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/lib \
> --include-dir ~/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/include
running build_ext building 'couchbase._libcouchbase' extension gcc-4.2
-fno-strict-aliasing -fno-common -dynamic -isysroot
...
...
intel-2.7/src/iops.o
build/temp.macosx-10.6-intel-2.7/src/connevents.o
build/temp.macosx-10.6-intel-2.7/src/pipeline.o
build/temp.macosx-10.6-intel-2.7/src/viewrow/viewrow.o
build/temp.macosx-10.6-intel-2.7/src/contrib/jsonsl/jsonsl.o
-L/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/lib -lcouchbase -o build/lib.macosx-10.6-intel-2.7/couchbase/_libcouchbase.so
...which ended without error. But testing the install failed:
~/Downloads/couchbase-1.2.4$ python -c 'import couchbase'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "couchbase/__init__.py", line 18, in <module>
from couchbase.connection import Connection
File "couchbase/connection.py", line 22, in <module>
import couchbase._bootstrap
File "couchbase/_bootstrap.py", line 34, in <module>
import couchbase.exceptions as E
File "couchbase/exceptions.py", line 18, in <module>
import couchbase._libcouchbase as C
ImportError: No module named _libcouchbase
So, I thought what the heck, I'll go ahead and try this:
~/Downloads/couchbase-1.2.4$ python setup.py install
...
...
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchbase-1.2.4-py2.7-macosx-10.6-intel.egg
Processing dependencies for couchbase==1.2.4
Finished processing dependencies for couchbase==1.2.4
But, I got the same import error when testing the install, so I gave up.
After reading the answer to my question, I did:
$ brew install gcc
but I didn't try to fix couchbase until now. I don't think installing gcc with homebrew did anything because I still get:
~$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc.
build 5666) (dot 3) Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
/usr/bin$ which gcc
/usr/bin/gcc
/usr/bin$ ls -al /usr/bin/gcc
lrwxr-xr-x 1 root wheel 7 Aug 11 2012 /usr/bin/gcc -> gcc-4.2
...which is the Apple version of gcc. But, when I installed gcc with homebrew I got the output:
/Users/7stud/.homebrew/Cellar/gcc/4.9.2_1: 1155 files, 200M, built in
106.8 minutes
...which is gcc version 4.9.
I am trying to install Apache2::AuthCookie on a CentOS 6 machine with the following command:
cpanm Apache2::AuthCookie
but I get the following error:
--> Working on Apache2::AuthCookie
Fetching http://www.cpan.org/authors/id/M/MS/MSCHOUT/Apache-AuthCookie-3.22.tar.gz ... OK
Configuring Apache-AuthCookie-3.22 ... OK
==> Found dependencies: autobox
--> Working on autobox
Fetching http://www.cpan.org/authors/id/C/CH/CHOCOLATE/autobox-2.82.tar.gz ... OK
Configuring autobox-2.82 ... OK
Building and testing autobox-2.82 ... FAIL
! Installing autobox failed. See /root/.cpanm/work/1415007741.22940/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'autobox' is not installed
! Bailing out the installation for Apache-AuthCookie-3.22.
Any ideas how to solve this problem?
build.log file
cpanm (App::cpanminus) 1.7014 on perl 5.010001 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1415007741.22940
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
Searching Apache2::AuthCookie on cpanmetadb ...
--> Working on Apache2::AuthCookie
Fetching http://www.cpan.org/authors/id/M/MS/MSCHOUT/Apache-AuthCookie-3.22.tar.gz
-> OK
Unpacking Apache-AuthCookie-3.22.tar.gz
Entering Apache-AuthCookie-3.22
Checking configure dependencies from META.yml
Configuring Apache-AuthCookie-3.22
Running Makefile.PL
[ info] generating script t/TEST
Checking if your kit is complete...
Looks good
Warning: prerequisite autobox 1.1 not found.
Generating a Unix-style Makefile
Writing Makefile for Apache::AuthCookie
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0 ... Yes (1.001008)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Checking if you have Apache::Test 1.35 ... Yes (1.38)
Checking if you have Class::Load 0.03 ... Yes (0.22)
Checking if you have autobox 1.1 ... No
Checking if you have mod_perl2 1.999022 ... Yes (2.000004)
Checking if you have CGI 3.12 ... Yes (4.09)
==> Found dependencies: autobox
Searching autobox on cpanmetadb ...
--> Working on autobox
Fetching http://www.cpan.org/authors/id/C/CH/CHOCOLATE/autobox-2.82.tar.gz
-> OK
Unpacking autobox-2.82.tar.gz
Entering autobox-2.82
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Configuring autobox-2.82
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for autobox
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Scope::Guard 0.20 ... Yes (0.20)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Building and testing autobox-2.82
cp lib/autobox.pod blib/lib/autobox.pod
cp lib/autobox/universal.pm blib/lib/autobox/universal.pm
cp lib/autobox.pm blib/lib/autobox.pm
Running Mkbootstrap for autobox ()
chmod 644 "autobox.bs"
"/usr/bin/perl" "/usr/share/perl5/ExtUtils/xsubpp" -typemap "/usr/share/perl5/ExtUtils/typemap" autobox.xs > autobox.xsc && mv autobox.xsc autobox.c
gcc -c -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -Wall -DVERSION=\"2.82\" -DXS_VERSION=\"2.82\" -fPIC "-I/usr/lib64/perl5/CORE" autobox.c
/bin/sh: gcc: command not found
make: *** [autobox.o] Error 127
-> FAIL Installing autobox failed. See /root/.cpanm/work/1415007741.22940/build.log for details. Retry with --force to force install it.
-> FAIL Installing the dependencies failed: Module 'autobox' is not installed
-> FAIL Bailing out the installation for Apache-AuthCookie-3.22.
After looking inside the log files I found out that I a compiler was missing.
yum install gcc-c++