osx-lion

Edit C Compiler used in MySQLdb Python

喜你入骨 提交于 2019-12-11 23:31:58
问题 I am trying to install MySQLdb 1.2.3 on Mac OSX Lion 10.7.3. When I run $ sudo ARCHFLAGS="-arch x86_64" python setup.py build An error is thrown that says: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 - I/usr/local/mysql/include - I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-x86_64-2.7/_mysql.o -Os -g -fno

Mac OS X Lion Psycopg2: Symbol not found: _PQbackendPID

人走茶凉 提交于 2019-12-11 22:31:16
问题 I recently upgraded to Mac OS X Lion and am trying to get psycopg2 working again with python 2.6. The instructions on previous sites to force Python to run in 32 bit more (seen places like here: http://favosdream.blogspot.com/2009/09/make-psycopg2-and-readline-work-in-snow.html ) aren't giving any luck. Even trying to force python to 32 bit using arch -i386 python is still giving me the error: symbol not found: _PQbackendPID Referenced from: /Library/Python/2.6/site-packages/psycopg2/_psycopg

Postgresql, problems after updating gem

▼魔方 西西 提交于 2019-12-11 19:02:49
问题 I just updated my gems. And now I have problems connecting to my postgresql database. I get the error: PGError could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"? I tried uninstalling the gem and reinstalling, I also tried to change the paths file and put '/usr/local/bin/' on top. I tried some of the things from post: Repairing Postgresql after upgrading to OSX 10.7 Lion This app worked

Error “no such instruction” while assembling project on Mac OS X

白昼怎懂夜的黑 提交于 2019-12-11 18:32:09
问题 I used homebrew to install GCC 4.7.0 and my project's make is failing at assembly-time. I can successfully take code from .c -> .s, but .s -> .o fails. To view the brew formula used to install GCC, please look at: https://github.com/Homebrew/homebrew-dupes/blob/master/gcc.rb . I also installed binutils from upstream using https://github.com/mxcl/homebrew/blob/master/Library/Formula/binutils.rb . Install binutils does not appear to introduce a new 'as' in the /usr/local/lib or similar. How can

How can I get the values I set for custom properties in AddressBook to persist?

核能气质少年 提交于 2019-12-11 16:07:08
问题 I have created a custom property in AddressBook named "Qref". I can check it's there using [ABPerson properties] , and it's always there for any test app I write. By the way, you can't remove custom properties, because [ABPerson removeProperties] hasn't been implemented. Let me know if it ever is, because I need to remove one whose name I mistyped. I set a property value with this code. ABPerson *p = <person chosen from a PeoplePicker>; NSError *e; if (![p setValue: aString forProperty:@"Qref

How to get Get Process By Name on Mac Os?

我与影子孤独终老i 提交于 2019-12-11 14:09:43
问题 So I want to get a process pointer and do something like Win32 WaitForSingleObject(hProcess, INFINITE); that would wait for process to quit if it is not null. How to create such GetProcessByName function for Mac/Unix like Os? 回答1: Look at [NSWorkspace runningApplications] and [NSRunningApplication runningApplicationsWithBundleIdentifier:] . You can KVO observe NSRunningApplication's terminated property. You can also watch the notification NSWorkspaceDidTerminateApplicationNotification . These

Unable to launch App built on Mavericks

走远了吗. 提交于 2019-12-11 13:56:35
问题 I have an app for my Java Application that build on another server machine. This server machine now upgraded with Mavericks + xcode 5.1. Earlier I was facing the issue of not signing my app on server machine with Mavericks + xcode 5.1 update and I did the changes as mentioned in post - Failed to sign Mac OS X app Changes to sign app are - #!/bin/sh if [ -f "/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate" ]; then export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents

java.nio.Files.move() - DirectoryNotEmptyException on OS X

强颜欢笑 提交于 2019-12-11 13:41:49
问题 I'm running a 3rd party library, and part of its operation is to download a zip file to a temp directory, unzip it and then move it from the temp directory to a final directory... for some reason, this fails when I leave system properties to the default: java.nio.file.DirectoryNotEmptyException: /var/folders/j_/1v53z7q15v51wyb00jzht_ch0000gn/T/vertx-68e24a9e-ee15-4b49-a796-7176714865ec at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:491) at sun.nio.fs.UnixFileSystemProvider.move

Can't install psycopg2 in virtualenv “error: stdarg.h: No such file or directory”

守給你的承諾、 提交于 2019-12-11 13:17:17
问题 NOTE: This same error also occurs when using easy_install, other ways of installation... I'm facing almost exactly the same problem as I'm trying to install psycopg2 onto Mac OS 10.6.3; it claims it can't find "stdarg.h" but I can see it's there; what should I do? , except I'm on OSX Lion (10.7) and I'm on Python v2.7. It's also seemingly related to Can't install psycopg2 with pip in virtualenv on Mac OS X 10.7 but I get a different error message. I made a new question because solutions that

Excel AddIn in Excel 2011 for MAC

扶醉桌前 提交于 2019-12-11 12:06:08
问题 How do you create an AddIn for Excel, if I am using Excel (Office 2011) on my MAC Machine(OS X Lion). 回答1: Office 2011 still does not have a "full-fledged AddIn-API" but most of the VBA interface is available and AppleScript is also supported... not an AddIn-API as with Office 2010 for Windows but you can create something close (depending on your goal)... 来源: https://stackoverflow.com/questions/6803286/excel-addin-in-excel-2011-for-mac