problems installing pdo_psql on snow leapord - postgresql

I'm trying to install the pdo drivers on OSX 10.6 and I've been following the directions found here:
Installing PDO-drivers for PostgreSQL on Mac (using Zend for eclipse)
Every time I try and compile the pdo_psql.so driver it compiles fine but the 'make test' finds a problem.
PHP Warning: PHP Startup: Unable to load dynamic library '/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so' - dlopen(/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so, 9): no suitable image found. Did find:
/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so: mach-o, but wrong architecture in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so' - dlopen(/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so, 9): no suitable image found. Did find:
/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so' - dlopen(/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so, 9): no suitable image found. Did find:
/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so: mach-o, but wrong architecture in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so' - dlopen(/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so, 9): no suitable image found. Did find:
/Users/me/temp/PDO_PGSQL-1.0.2/modules/pdo_pgsql.so: mach-o, but wrong architecture in Unknown on line 0
=====================================================================
PHP : /usr/bin/php
PHP_SAPI : cli
PHP_VERSION : 5.3.4
ZEND_VERSION: 2.3.0
PHP_OS : Darwin - Darwin localhost 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386
INI actual : /Users/me/temp/PDO_PGSQL-1.0.2/tmp-php.ini
More .INIs :
CWD : /Users/me/temp/PDO_PGSQL-1.0.2
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2011-04-12 00:35:43
=====================================================================
I'm running a 32 bit kernel and my env vars are set as such. After google-ing for hours I'm stuck. Thanks for any help you can provide.

It turns out with my new laptop I grabbed the wrong disk set for Xcode. When I installed the correct (newest) version, everything worked.

Related

Mac OS Big Sur redis.so: mach-o, but wrong architecture MAMP

I have installed redis on my mac Big Sur 11.0.1 and also, I have installed MAMP. Now, I am trying to add phpredis as redis extension but I am having php error while loading redis.so file which I created using cloned github phpredis used phpize ./configure --with-php-config=/Applications/MAMP/bin/php/php7.4.12/bin/php-config, then restarted the MAMP, it throws the following error
[09-Jan-2021 23:47:55 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /Applications/MAMP/bin/php/php7.4.12/lib/php/extensions/no-debug-non-zts-20190902/redis.so (dlopen(/Applications/MAMP/bin/php/php7.4.12/lib/php/extensions/no-debug-non-zts-20190902/redis.so, 9): no suitable image found. Did find:
/Applications/MAMP/bin/php/php7.4.12/lib/php/extensions/no-debug-non-zts-20190902/redis.so: mach-o, but wrong architecture
/Applications/MAMP/bin/php/php7.4.12/lib/php/extensions/no-debug-non-zts-20190902/redis.so: mach-o, but wrong architecture), /Applications/MAMP/bin/php/php7.4.12/lib/php/extensions/no-debug-non-zts-20190902/redis.so.so (dlopen(/Applications/MAMP/bin/php/php7.4.12/lib/php/extensions/no-debug-non-zts-20190902/redis.so.so, 9): image not found)) in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/gd2'

I recently bought a new Macbook pro with php 7.1 installed and everything was working fine since I tried to upgrade php to 7.2 using homebrew. When I try to show my version of php with php -v, and it works but it returns me the following warnings :
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20160303/gd2' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/gd2, 0x0009):
closured error in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20160303/mbstring' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/mbstring,
0x0009): closured error in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20160303/mysqli' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/mysqli,
0x0009): closured error in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20160303/pdo_mysql' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/pdo_mysql,
0x0009): closured error in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20160303/sockets' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/sockets,
0x0009): closured error in Unknown on line 0
It seems to be an error with gd2, mbstring, mysqli, pdo_mysql and sockets files but they do not exist on the no-debug-non-zts-20160303/ folder...
Is there a way using homebrew to reinstall all these missing files ?
Thanks

PHP Startup: Unable to load dynamic library mongodb.so Symbol not found

I installed mongodb php driver on MACOS, XAMPP and PHP 7.1.11 by command line sudo pecl install mongodb then run php -v and got errors
$ php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): Symbol not found: _zend_ce_countable
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so
Expected in: flat namespace
in /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): Symbol not found: _zend_ce_countable
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so
Expected in: flat namespace
in /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so in Unknown on line 0
Configuration File (php.ini) Path: /Applications/XAMPP/xamppfiles/etc
Loaded Configuration File: /Applications/XAMPP/xamppfiles/etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
Please help !

Use CPAN BerkeleyDB module on Windows 7 (64 bit)

I have been trying to install the BerkeleyDB CPAN module on my Windows 7 (x86_64) PC without any luck (BerkeleyDB::Hash is what I need). I have 64 bit ActivePerl and Oracle Berkeley DB 11gR2 5.3.15 installed. First I tried installing using the command :
*cpan install BerkeleyDB*
This came back with the error:
*It looks like the installation of dmake and MinGW has failed. You will not be
able to run Makefile commands or compile C extension code. Please check your
internet connection and your proxy settings!*
So I installed Microsoft Windows SDK for Windows 7 and .NET Framework 4.
Then I installed cpanm
*cpan App::cpanminus*
And when I tried running:
*cpanm BerkeleyDB*
I got the error:
*Note (probably harmless): No library found for -llibdb
Note (probably harmless): No library found for bufferoverflowU.lib*
So I edited the config.in file and changed the lib and include paths to:
*INCLUDE = C:\PROGRA~2\Oracle\BERKEL~1.15\include
LIB = C:\PROGRA~2\Oracle\BERKEL~1.15\lib*
Now when I ran perl makefile.pl, the warning about -llibdb went away.
When I tried running:
*nmake*
I got errors:
*Creating library blib\arch\auto\BerkeleyDB\BerkeleyDB.lib and object blib\arc
h\auto\BerkeleyDB\BerkeleyDB.exp
BerkeleyDB.obj : error LNK2001: unresolved external symbol __heap_exist
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_version
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_strerror
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_env_create
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_create
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_sequence_create
blib\arch\auto\BerkeleyDB\BerkeleyDB.dll : fatal error LNK1120: 6 unresolved ext
ernals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\Bin\amd64\link.EXE"' : return code '0x460'
Stop.*
I've nearly lost all hope of ever building this module successfully on my PC. Has anyone been lucky with this?
Many thanks,
SN
All following claims untested/unverified. Competent advice is available from #win32 on MagNET <irc://irc.perl.org/win32> (Web chat).
libdb needs patching for 64-bit. Installing a whole new compiler toolchain before installing the dependent library and its headers made the problem worse. If you continue to have problems linking after applying the patch, uninstall the MS tools and try again with MinGW.

Compiling tesseract for iOS

I am trying to compile tesseract 3.01 for iOS 4.0. Config script for tesseract fails with the following error:
checking for acos... yes
checking for asin... yes
checking for leptonica... yes
checking for pixCreate in -llept... no
configure: error: leptonica library missing
make: *** [config.status] Error 1
I have leptonica 1.68 built and have set the right LDFLAGS and LIBLEPT_LIBDIR values. Am I missing something?
You can use the prebuilt library itself. Have a look at here https://stackoverflow.com/a/9124709/641062