osx-lion

Easiest way to activate PHP and MySQL on Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion)?

懵懂的女人 提交于 2019-11-27 16:40:01
What is the easiest way to activate PHP and MySQL on Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion)? I'd prefer to use any bundled versions before resorting to downloading from the PHP or MySQL websites. That also rules out MAMP and similar. I'm comfortable at the command line in Terminal. TWLATL Open a good text editor (I'd recommend TextMate, but the free TextWrangler or vi or nano will do too), and open: /etc/apache2/httpd.conf Find the line: "#LoadModule php5_module libexec/apache2/libphp5.so" And uncomment it (remove the #). Download and install the latest MySQL version

What is the correct way to prevent sleep on OS X? [duplicate]

做~自己de王妃 提交于 2019-11-27 14:48:40
问题 Possible Duplicate: How to programmatically prevent a Mac from going to sleep? What is the correct method on the current version of OS X (10.7) for preventing sleep while an application or process is running? In particular, is IOCancelPowerChange still (or did it ever) serve this purpose? I call IOCancelPowerChange in response to kIOMessageCanSystemSleep , but that doesn't do the trick. Essentially the same question as the first part of this one has been asked before, but the documentation it

Uninstalling Xcode 4.3

蹲街弑〆低调 提交于 2019-11-27 14:39:12
问题 I have Xcode 4.3 installed on Mac OS Lion, but I can't find a way to uninstall it. Any ideas? I have no /Xcode4/Library/uninstall-devtools (can't find an Xcode4 folder) or /Developer/Library/uninstall-devtools (Library folder doesn't exist under Developer) I have a Users/me/Library/Developer/Xcode with: DerivedData UserData Installs iOS DeviceSupport I have /Developer with Applications Documentation Extras Platforms The only other place I could find a reference to Xcode was in Applications

Trouble installing pg gem

萝らか妹 提交于 2019-11-27 14:20:17
问题 Trying to install the pg gem gives me errors. I'm using Ruby 1.9.3-p125 built using rbenv/ruby-build. I installed PostgreSQL using the one-click installer. I'm able to connect to the DB using pgAdmin. I'm running out of ideas. % gem install pg ~ Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /Users/sandropadin/.rbenv/versions/1.9.3-p125/bin/ruby extconf.rb checking for pg_config... yes Using config values from

How to use AVX/pclmulqdq on Mac OS X

随声附和 提交于 2019-11-27 13:33:29
I am trying to compile a program that uses the pclmulqdq instruction present in new Intel processors. I've installed GCC 4.6 using macports but when I compile my program (which uses the intrinsic _mm_clmulepi64_si128), I get /var/folders/ps/sfjmtgx5771_qbqnh4c9xclr0000gn/T//ccEAWWhd.s:16:no such instruction: `pclmulqdq $0, %xmm0,%xmm1' It seems that GCC is able to generate the correct assembly code from the instrinsic, but the assembler does not recognize the instruction. I've installed binutils using macports, but the problem persists. How do I know which assembler gcc is using? The XCode

Why am I getting the error: command 'llvm-gcc-4.2' failed with exit status 1

旧时模样 提交于 2019-11-27 13:13:11
问题 I am setting up os X 10.7. I am using the default install of Python: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ I use a Python based package manager called easy_install. Easy_install seems to not be able to find the compiler. EDIT: When I tried to install MySQL-python I got this error: $ sudo easy_install MySQL-python Password: Searching for MySQL-python Reading http://pypi.python.org/simple/MySQL-python/ Reading http://sourceforge.net/projects/mysql-python/ Reading http

Failed to build gem native extension

孤者浪人 提交于 2019-11-27 12:56:28
问题 End result is I'm trying to get Ruby on Rails installed on my OS 10.7.3, but having various issues. Also, I have a freshly installed XCode 4.3 from the App Store. When I fire up the terminal, and enter: sudo gem install rails and it writes out: Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby

Xcode asking username & password every time I compile to device

柔情痞子 提交于 2019-11-27 12:49:18
问题 I use an admin account for the development. But every time I compile to a device Xcode is asking for admin username & password. I googled the issue. But none of the solutions worked. I tried the workarounds from this post, but it didn't work Authorize a non-admin developer in Xcode / Mac OS I also tried disabling and enabling the DevSecurityTools but it didn't work. I am using Xcode 4.3.1 installed on Mac OSX Lion 10.7.3. Is there any way to fix this? 回答1: For solution go to Keychain Access,

How to put a tkinter window on top of the others?

梦想与她 提交于 2019-11-27 12:47:26
I'm using Python 2 with Tkinter and PyObjC , and then I'm using py2app . The program is working fine, but the window starts as hidden whenever I open the program, so it doesn't appear until I click on the icon on the dock to bring it up. Is there any way to control this, make the window to be on top of other windows that were open when the application is starting? Just to clarify, it doesn't have to be on the top for the whole time the application is running. I just need it to be on top of other windows when it starts. vdbuilder If I take the code you give and add the first and last line you

Bash piping in OSX prompts command not found, sometimes

谁说胖子不能爱 提交于 2019-11-27 12:27:58
问题 In the OSX terminal : du -h | sort -nr -bash: sort: command not found which sort /usr/bin/sort The weird thing is: I tried reproducing the error and it seems to be totally random. My PATH echoed: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/sytycs/.rvm/bin This only occurs when piping and happens with grep , more , less etc. Any idea what is causing this? 回答1: That space is not a space. Erase and replace it. 回答2: This likely happens because