标签: osx-lion

升级到Lion,无法构建gem原生扩展

不确定我的问题是否与此线程有关(http://stackoverflow.com/questions/6589066/rmagick-and-os-x-lion),但我刚刚升级到Lion; 更具体地说,我购买了一台新机器,并通过我的旧配置文件迁移.

我无法启动rails 3,因为它无法找到rmagick,我无法安装rmagick,因为我收到以下错误.我尝试卸载rmagick和imageMagick,但在尝试捆绑安装时仍然遇到同样的错误.有什么想法吗?谢谢

Installing rmagick (2.13.1) with native extensions /opt/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': ERROR:     Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

    /opt/local/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/gcc-4.2... no
No C compiler found in ${ENV['PATH']}. See mkmf.log for details.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include …
Run Code Online (Sandbox Code Playgroud)

macos rubygems rmagick osx-lion

5
推荐指数
1
解决办法
5573
查看次数

glext.h的问题

当我发现现在让我害怕使用的东西glext.h时,我只是在浏览OS X Lion上的OpenGL更新.

所以,这是错误.Lion的OpenGL.framework具有glext.h以下定义.

typedef void *GLhandleARB;
Run Code Online (Sandbox Code Playgroud)

但是glext.h来自OpenGL注册表的内容却是以下内容.

typedef unsigned int GLhandleARB;
Run Code Online (Sandbox Code Playgroud)

现在,麻烦的是,在Lion上为x86_64构建时,我们有sizeof(void*)==8,但是sizeof(unsigned int)==4.那么你信任什么?狮子头?还是OpenGL注册表的标题?好吧,当然你信任系统头,因为显然他们声称知道64位Lion上的ABI有64位GLhandleARB类型.

现在,这引发了一些关于各种平台的问题:

  1. 如果您必须使用Apple glext.h,但Apple glext.h不提供访问OpenGL 2.1之后的任何内容,那么如何在新卡上获得3.0+功能?

  2. glext.h在Linux上使用OpenGL注册表是不安全的吗?或者你glext.h也必须在那里使用系统吗?在这种情况下,问题#1也适用于此.

  3. 如何赫克你处理Windows的事情,那里是从来没有一个glext.h系统上?您显然无法使用驱动程序供应商glext.h,因为不同的供应商可能不同意各种类型的大小.(或者这不是真的吗?)这里的交易是什么?

linux windows opengl macos osx-lion

5
推荐指数
1
解决办法
2158
查看次数

有助于改善我个人的高内存使用率的个人解决方案,或者说为什么它没有用

好.我有点生气,因为我在带有8GB内存的i7 MPB上运行Mac OS Lion,而且Safari的性能始终会降低.

因此,我注意到不仅Safari.app消耗了异常的内存量,而且它的一对名为"Safari Web Content"(消费更多).

对此感到恼火,我决定杀死那个"Safari Web Contant"实例(它们总是成对出现,好奇.但是,无论如何),毕竟Safari.app是主要的应用程序.发生了什么?您知道Safari中的所有选项卡何时自动刷新?出现相同的效果:Safari Web Content的内存使用率下降(退出,然后从零点重新启动),所有选项卡都会在选择时刷新.它让我相信那些标签的自动刷新有时会发生,只不过是一种以非常奇怪的方式释放内存的方式(用葡萄牙语称为"chuncho").

好的,那又怎样?好吧,如果这似乎(至少对我来说)是更好地处理内存消耗的"官方"方式,我想如果我做同样的话也没关系,对吧?

因此,我创建了一个小脚本,每分钟作为crontab作业运行,检查"Safari Web Content"内存使用率是否过高,如果是,则将其杀死.

这里是:

#!/bin/bash

filename=".tt_0e92309ei2390i209ei9203"
LIMIT=6

ps -eo pmem,pid,args | grep WebProcess.app | grep -v grep | cut -d"/" -f1 > $filename

while read line
do
  mem=`echo "${line}"| awk '{print $1}'`
  mem=$(echo $mem | sed -e 's/,/./g')
  pid=`echo "${line}"| awk '{print $2}'`

  status=$(echo "$mem > $LIMIT" | bc -l)

  if [ "$status" -eq "1" ]
  then
    kill $pid
  fi

done < $filename

rm $filename
Run Code Online (Sandbox Code Playgroud)

不介意随机命名的文件名,也不介意我可能做过的奇怪事情("chunchos"):P该脚本基本上检查是否有任何"Safari Web内容"进程消耗超过我的内存的$ …

safari macos memory-management osx-lion

5
推荐指数
1
解决办法
3273
查看次数

如何在OSX Lion上启用PHP错误?

我无法让我的设置显示PHP错误.我唯一看到的是WSOD.

我已经更新了我的php.ini文件:

(摘自phpinfo())

display_errors          On      On
display_startup_errors  On      On
error_reporting         30719   30719
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

php wsod osx-lion

5
推荐指数
1
解决办法
1万
查看次数

在OS X Lion上安装PIL

我试图在Mac OSX 10.7.4上安装PIL,但几个小时后尝试无法成功.我一直遇到同样的问题,在下面的pastebin链接中提供了详细信息.开导我!!

设置

tbc:~ mystic$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
Run Code Online (Sandbox Code Playgroud)

引擎收录

我从几个来源搜索和尝试:

Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Image
>>> import PIL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No …
Run Code Online (Sandbox Code Playgroud)

python python-imaging-library osx-lion

5
推荐指数
1
解决办法
9499
查看次数

在MacOSX Lion上点击安装django超时

在MBP上,按照说明(http://techblog.rosedu.org/python-environment.html),我安装了Xcode 4.4.1,brew(brew医生说所有设置),然后是python.接下来,我尝试设置virtualenv:

> $MYPYTHON/bin/python distribute_setup.py
> $MYPYTHON/bin/easy_install pip
> $MYPYTHON/bin/pip install virtualenv
Run Code Online (Sandbox Code Playgroud)

然后我创建了一个虚拟环境并尝试安装django:

> $MYPYTHON/bin/virtualenv $MYENV
> $MYENV/bin/pip install Django
Run Code Online (Sandbox Code Playgroud)

它下载了98%,然后暂停一段时间,最后我得到一个指示超时的回溯:

pcm@pcm-mac[302]% $MYENV/bin/pip install django
Downloading/unpacking django
  Downloading Django-1.4.1.tar.gz (7.7Mb): 7.5Mb downloaded
Exception:
Traceback (most recent call last):
  File "/Users/pcm/Documents/workspace/virtual/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/Users/pcm/Documents/workspace/virtual/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/Users/pcm/Documents/workspace/virtual/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 985, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/Users/pcm/Documents/workspace/virtual/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1109, in unpack_url
    retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
  File "/Users/pcm/Documents/workspace/virtual/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", …
Run Code Online (Sandbox Code Playgroud)

python django pip osx-lion

5
推荐指数
1
解决办法
2369
查看次数

在Mac OS X Lion中初始化Java VM时出错

我在使用Java在Mac OS X Lion上工作时遇到了问题.我完成了Java升级,完全删除了它.然后我再次需要它,并且我安装了7v9.apps但是没有用.

然后,我做了Apple KB(知识库)文章,将其恢复为6,但这不起作用.我完全卸载它(现在很多次),并重新安装7v9,但我无法使我的应用程序工作,也无法打开java控制台.

有人可以帮忙吗?以下是来自控制台的日志:

10/31/12 3:01:44.681 PM [0x0-0x6ea6ea].com.apple.systempreferences: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/jcontrol: line 116: [: too many arguments

10/31/12 3:01:44.681 PM [0x0-0x6ea6ea].com.apple.systempreferences: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/jcontrol: line 120: [: -Xdock:icon=/Library/Internet: binary operator expected

10/31/12 3:01:44.723 PM [0x0-0x6ea6ea].com.apple.systempreferences: Error occurred during initialization of VM

10/31/12 3:01:44.723 PM [0x0-0x6ea6ea].com.apple.systempreferences: java.lang.NullPointerException

10/31/12 3:01:44.723 PM [0x0-0x6ea6ea].com.apple.systempreferences:     at java.util.Hashtable.put(Hashtable.java:542)

10/31/12 3:01:44.723 PM [0x0-0x6ea6ea].com.apple.systempreferences:     at java.lang.System.initProperties(Native Method)

10/31/12 3:01:44.723 PM [0x0-0x6ea6ea].com.apple.systempreferences:     at java.lang.System.initializeSystemClass(System.java:1115)
Run Code Online (Sandbox Code Playgroud)

java macos osx-lion

5
推荐指数
1
解决办法
1543
查看次数

gnuplot x11和OSX 10.8.2

我正在尝试将gnuplot与OSX 10.8.2一起使用,并且看到x11是一个ambiguous or unknown terminal type.一些研究显示x11不受支持,我下载XQartz,但我仍然得到相同的错误消息.

我编辑.bash_profile,export GNUTERM = 'x11'然后ln -sf /Application/Utilities/XQuartz.app/ X11.app按照此处的建议进行尝试

但仍然是相同的错误消息.我还可以尝试绘制我的gnuplot文件(在我的笔记本电脑和服务器上)?

谢谢.

x11 gnuplot osx-lion

5
推荐指数
1
解决办法
3046
查看次数

Cabal不会更新二进制符号链接

我正在使用OS X 10.8.2和Haskell Platform 2012.4.0.0.使用时更新包时cabal install,二进制符号链接不会更新以指向新的二进制版本.我必须手动删除符号链接并重新安装包.cabal install说:

警告:无法在/ Users/thsoft/Library/Haskell/bin中为elm创建符号链接,因为该文件已存在但不受cabal管理.如果您愿意,可以手动为此可执行文件创建符号链接.可执行文件已安装在/Users/thsoft/Library/Haskell/ghc-7.4.1/lib/Elm-0.7/bin/elm

我尝试使用sudo--symlink-bindir=/Users/thsoft/Library/Haskell/bin明确指定,但没有一个帮助.我怎么能解决这个问题?

haskell cabal cabal-install osx-lion

5
推荐指数
1
解决办法
927
查看次数

Lion OS - brew更新返回"执行时失败..."

当我设置时,我正在尝试更新我的brew

brew更新

我收到此错误:

error: Your local changes to the following files would be overwritten by merge:
    Library/Formula/imagemagick.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
Run Code Online (Sandbox Code Playgroud)

要么

error: The requested URL returned error: 403 while accessing https://github.com/mxcl/homebrew/info/refs
fatal: HTTP request failed
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
Run Code Online (Sandbox Code Playgroud)

Git有什么问题?如果这种方式不起作用,如何更新brew?

git homebrew osx-lion osx-mountain-lion

5
推荐指数
2
解决办法
1252
查看次数