Help Installing psycopg2 on snow leopard : command '/usr/bin/gcc-4.0' failed with exit status 1 - gcc

This has been driving me crazy for 2 days.
I have been trying to install psycopg2 using easy_install and no matter what I try (i.e using gcc-4.0 instead of the snow leopard default one) I always get the same error:
error: Setup script exited with error: command '/usr/bin/gcc-4.0' failed with exit status 1
Please see: http://dpaste.com/hold/228252/
I have googled that error so many times and nothing I have found seem to help.

Looks like you're missing a dependency, the development files for libpq. The relevant log part is here:
In file included from psycopg/psycopgmodule.c:32In file included from psycopg/psycopgmodule.c:32:
./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory
Try installing libpq development files and then rerun easy_install. You may hit another missing dependency; pay attention to the first error that GCC spits out.

Link http://dpaste.com/hold/228252/ seems to be dead, this is how I solved this problem (Mac OS X 10.6, virtualenv).
If pip fails with this message, just take a look to build folder in your virtual environment. You should edit setup.cfg file there, particularly include_dirs and library_dirs. In first one set your include folders, my option was:
include_dirs=/opt/local/include/postgresql84:/opt/local/include/postgresql84/server
and most likely you will need to set library_dirs to correct location as well:
library_dirs=/opt/local/lib/postgresql84.

probably you should install postgresql-devel first
yum -y install postgresql-devel

Related

Cannot Find libatomic.so.1

I'm trying to build snappy, but I end up getting the error
error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
When I go look in /lib/gcc/x86_64-redhat-linux/8/ I do find a file libatomic.so
Which has the contents
INPUT ( /usr/lib64/libatomic.so.1.2.0 )
then if I go looking in /usr/lb64/ only these files exist
libatomic_ops_gpl.so.1
libatomic_ops_gpl.so.1.1.2
libatomic_ops.so.1
libatomic_ops.so.1.1.1
I try doing yum install libatomic_ops.x86_64, it says nothing to do. That is the only package that comes up when doing yum search libatomic.
I'm confused with how to solve this issue. Thanks!
For what it matters, this is a redhat 8.6 machine.
This was solved by running dnf install gcc, this updated gcc and allowed for yum install libatomic to work

./configure doesn't find Qt5Core, QT5GUI, QT5Widgets

I've recently replaced Win10 by Linux Debian 11.2 on my PC (hence I'm a newbee in Linux). Now, not all programs are available as deb-Files.
I tried to compile source code - here a synthesizer ams-2.2.0 - from a tar.gz files (after unzipping into a separate folder) with steps (as written in the INSTALL.TXT to this source, and obviously usual)
./configure
make
make install
I get a bunch of error messages for missing files, when running ./congigure most resolved by installation of missing packages, but at last it fails with error message:
checking for QTCore Qt5Gui Qt5Widgets >= 5.0... no
configure: error: cannot find Qt5 library >= 5.0
(hope to get all written correctly, because I can't copy from the terminal ... Ctrl-Shift-C doesn't seem to work)
I checked the installation in synaptics and found that Qt-Version is 5.12. So what's wrong here?
I'm afraid to have this error message everytime I try to compile different source codes.
You need to install libqtcore and libqtwidgets with development headers, they are in qtbase5-dev package.
sudo apt install build-essential qtbase5-dev qtchooser

FreeBSD make error File 5.19 supports only version 12 magic files. /usr/share/misc/magic.mgc is version 8

I'm having trouble reinstalling ProFTPD on a FreeBSD 10.1 setup. The server is newly upgraded from 10.0 to 10.1. When I start the make install clean process, these warnings first shows on screen.
===> proftpd-1.3.5_4 depends on shared library: libpcre.so
/usr/share/misc/magic, 93: Warning: Printf format `l' is not valid for type `lelong' in description `, %ld pages'
...
/usr/share/misc/magic, 15118: Warning: Printf format `l' is not valid for type `belong' in description `Volume %ld,'
/usr/share/misc/magic, 15609: Warning: Current entry does not yet have a description for adding a MIME type
file: File 5.19 supports only version 12 magic files. `/usr/share/misc/magic.mgc' is version 8
[: =: unexpected operator
- not found
And after i while, the make process stops with this error:
/bin/ln -s libpcre.so.1 /usr/ports/devel/pcre/work/stage/usr/local/lib/libpcre.so.3
====> Compressing man pages (compress-man)
===> Installing for pcre-8.35_2
===> Checking if pcre already installed
===> pcre-8.35_2 is already installed
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of pcre
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1
Stop.
make[3]: stopped in /usr/ports/devel/pcre
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/devel/pcre
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/ftp/proftpd
*** Error code 1
Stop.
make: stopped in /usr/ports/ftp/proftpd
Seems that the file /usr/share/misc/magic.mgc is of a wrong version?
This might happens when I was upgrading from 10.0-RELEASE-p12 to 10.1-RELESE-p1?
If i run make install clean of the ProFTP port, and disable support for pcre, the process and install is successful.
But I believe that something is still broken?
My programming skills are limited, and also this level of error.
Please let me know if you have any ideas,
Thanks,
First of all, proftpd 1.3.5 is available as a binary package, it's much simpler to install it that way (pkg install proftpd).
Second - at first it looked like a port bug; as Etan said, there is a shell syntax error (something like '[ x == y ]' instead of '[ x = y ]'); those are common, and ports contain patches to fix those. However, there is a binary package, and packages are built from ports ("make package"), so port obviously does work on package build machines. So it's probably something specific to your environment.
If you really want to build from ports, try this: first, reinstall pcre. For some reason it had to be rebuilt, but failed to install, because it's already installed. So, "cd /usr/ports/*/pcre && make clean all deinstall reinstall". That should get rid of the second error. Then go back to "../*/proftpd" and see how far it goes.
But really, I'd try packages first. They have nothing in common with old pkg_add system, and are really nice.
freebsd-update diff for FreeBSD-SA-14:28.file seems wrong, and it breaks file(1).
Therefore simply pkg install file will be a workaround.

Error -60005 when install Cocos2d-iPhone v3 RC4

When I try to install Cocos2d-iphone 3.0.0 RC4, I got an error: (run without sudo)
Error -60005 occurred while executing script with privileges.
So, I try to show its package content and use terminal to do: cd ...Cocos2D Installer 3.0.0.app/Contents/MacOS
I try this command: (with sudo)
sudo ./Cocos2D\ Installer\ 3.0.0
It works but I got log with some errors:
[1m>>> Installing Cocos2D-v3.0.0 files (B[m
[1m>>> Installing Cocos2D-v3.0.0 templates (B[m
[4m[1mCocos2D Template Installer (Cocos2D-v3.0.0)(B[m
Error: [31m✖︎(B[m Script cannot be executed as root.
In order for it to work properly, please execute the script again without 'sudo'.
If you want to know more about how to use this script execute '/Users/viethung/Downloads/Cocos2D-v3.0.0/install.sh --help'.
[1m>>> Building/Installing Cocos2D-v3.0.0 documentation, this may take a minute.... (B[m
appledoc version: 2.2 (build 963)
Generation step 4/5 failed: GBDocSetInstallGenerator failed generating output, aborting!
Documentation set was installed, but couldn't reload documentation within Xcode.
Xcode got an error: No documentation set present at specified path.
[1m>>> Cocos2D-v3.0.0 installation complete! (B[m
Are there any way is better than this way?
I have same problem.
I think you installed old cocos2d-iphone and it caused this problem.
You should remove old cocos2d-iphone first. I removed:
~/Library/Developer/Xcode/cocos2d v3.x
And install again. It works for me.
Hope it works for you :)

easy_install M2Crypto failing on Windows platform

I am attempting to install M2Crypto on a Windows XP platform. I have Python, easy_install and SWIG installed, but when I attempt to easy_install M2Crypto I get the following:
SWIG\_m2crypto.i(31) : Error: Unable to find 'openssl\opensslv.h'
SWIG\_m2crypto.i(45) : Error: Unable to find 'openssl\safestack.h'
SWIG\_evp.i(12) : Error: Unable to find 'openssl\opensslconf.h'
SWIG\_ec.i(7) : Error: Unable to find 'openssl\opensslconf.h'
error: Setup script exited with error: command 'swig.exe' failed with exit status 1
I have read elsewhere that people have suggested easy_install openssl-devel, but that simply tells me that there are no packages found with that name. Is the name perhaps case-sensitive (I've tried various permutations without success), or does that advice not apply to Windows?
I'm not looking for alternatives to M2Crypto. I am picking up some existing code that uses it, so I need to get my development environment to be able to run what's already written.
As jay stated in his answer you should try to build it from source. And I tried. The setup.py does not recognize the --openssl option. Looking at the output from the default setup.py I realized that the search location was c:\pkg and not c:\pkg\openssl.
The solution:
Download and install OpenSSL from Win32 OpenSSL
Copy the lib and include folders to c:\pkg
Check that swig.exe is available in your path
Run easy_install M2Crypto
Worked for me like a charm.
Had a similar problem. After downloading the source package of M2Crypto and reading the INSTALL file I found the following:
Differences when installing on Windows
--------------------------------------
Before building from source, you need to install OpenSSL's include files,
import libraries and DLLs. By default setup.py assumes that OpenSSL include
files are in ``c:\pkg\openssl\include``, and the import libraries
in ``c:\pkg\openssl\lib``. As with other platforms, you can specify a different
OpenSSL location with --openssl option to build_ext command.

Resources