标签: osx-lion

MAMP 中的 Imagick 问题

所以我遵循了此页面上的所有说明:

http://toomtech.com/post/8832473042/mamp-imagemagick-lion

Imagick 已安装,我可以验证 imagick.so 是否位于 MAMP 中的相应文件夹中。

但是,phpinfo 中没有显示任何与 Image Magick 或 Imagick 相关的内容...当我调用时,new Imagick()出现错误:找不到类“Imagick”

我可能会错过什么?我在 Lion 上运行 MAMP。

mamp imagemagick imagick osx-lion

2
推荐指数
1
解决办法
3064
查看次数

如果 OS X 中的 Preview.app 不是 Applescriptable,为什么它可以工作?

我在 AskDifferent 上问了另一个关于 Preveiw 脚本词典的问题,并在此处进行了后续搜索,结果显示 Preview 不可编写脚本。

\n\n

但是当我跑步时:

\n\n
tell application "Preview"\n    set save_location to \xc2\xac\n        (choose file with prompt "Choose the png to be modified")\n    activate\n    open save_location\n\nend tell\n
Run Code Online (Sandbox Code Playgroud)\n\n

有用。这是否意味着 Preview.app 可以使用 Applescript 2.2.1 和我正在使用的 Max OS X 10.7.5 编写脚本?

\n\n

如果是这样,那么我在哪里可以找到对象列表?

\n

applescript osx-lion

2
推荐指数
1
解决办法
1382
查看次数

在Mac OSX Lion上禁用脚本提示?

我在想...

是否可以在Mac OSX Lion上禁用提示.

您确定要运行此脚本吗?[是的,取消]

我将此脚本添加到"登录项"文件中,以便在我登录时自动启动,但仍会弹出提示.有任何想法吗?谢谢.

macos applescript osx-lion

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

Emacs在Mac OS X Lion上删除

我将我的iMac桌面从Snow Leopard更新为Lion.我使用扩展USB键盘,它有两个删除键:一个与常用键(上面的\)和一个在扩展部分(下面的fn).

在Snow下的Emacs中,第一个删除键用作"反向删除",第二个删除键用作"向前删除".但是在Lion下,它们都是"向后删除".另一方面,它们在其他环境中正常工作(TextEditor,MS Word,Terminal,this text等).

我认为我必须在我的.emacs文件中插入一些额外的密钥配置,但我不知道是什么.任何提示?

我的Emacs是Emacs 23.3.1(x86_64-apple-darwin,NS apple-appkit-1038.35).

macos emacs osx-lion

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

C++在XCode 4.2中没有编译(链接?)

我在Xcode中有一个非常小的程序,只显示标签并在viewWillAppear方法中更改标签的文本.label.text应该来自一个C++库,其函数如下:

int getNumber(){
    return 42;
}
Run Code Online (Sandbox Code Playgroud)

问题是,在我的*.mm(!)类中包含#import"TestLibMain.h"的类并使用该函数

TestLibMain *tlb = new TestLibMain();
int myInt = tlb->getNumber();
NSString *myString = [NSString stringWithFormat:@"%d",myInt];
Run Code Online (Sandbox Code Playgroud)

不会调用编译器错误,但会发生链接器错误:

架构i386的未定义符号:"TestLibMain :: getNumber()",引自: - tbViewController.o中的[tbViewController buttonPressed:] ld:找不到架构i386 clang的符号:错误:链接器命令失败,退出代码为1 (使用-v查看调用)

我的印象是,cpp-class尚未编译.

我尝试了很多东西,但在某个地方它已经挂了.它都在同一个目录中,我使用.mm扩展名,一切都很好,但总是这个链接器错误.变得疯狂 :-)

Mac OS X Lion,XCode 4.2

有任何想法吗?

c++ xcode objective-c objective-c++ osx-lion

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

是否可以执行相对于Terminal shell脚本的命令?

我有一个终端shell脚本文件start.command,我从finder启动:

ls -l
Run Code Online (Sandbox Code Playgroud)

该文件在~/foo列表中~,我可以获取它包含dir的路径.我想在用户运行时启动与文件位于同一文件夹中的应用程序,.command但似乎我需要文件的绝对路径才能工作.

osx-lion

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

403 & 500 error on Apache server when using .htaccess

I'm trying to use a .htaccess file on the Apache Server running on my Macbook (OS X Lion). I've used the following guide to modify the permissions in my Apache configuration file allow use of .htaccess: http://clagnut.com/blog/350/ - Substituting in the OS X Lion's new httpd.conf file locations.

However, when adding a .htaccess file I get a 500 Internal Server Error.

With the User.conf set adjusted to the following, I get a 403 Forbidden Error.

AllowOverride All #AuthConfig gives 500 …
Run Code Online (Sandbox Code Playgroud)

apache .htaccess mod-rewrite httpd.conf osx-lion

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

在OS X Lion 10.7.4和Python 3.2.2上安装MatPlotLib 1.2.x.

几天前我问了一个关于在同一系统上安装numpy的问题.值得庆幸的是,我设法自己解决了这个,但不幸的是我现在卡住尝试安装matplotlib.

我首先尝试了当前的分布式版本,但没有运气,所以我想我会下载git存储库并试试.我到目前为止:

  • 更改了make.osx文件,以便它可以在Python 3中工作:
    • import urllib - > import urllib.request
    • urllib.urlretrieve() - > urllib.request.urlretrieve()

即使在那之后我仍然遇到问题,没有找到freetype2标头.我用Google搜索并发现我可以通过编辑一行来解决这个问题setupext.py:

  • 'darwin' : [], - > 'darwin' : ['/usr/local'],

但是,使用该make.osx文件时仍会收到错误消息.这是我从终端调用文件的方式:

  • sudo make -f make.osx PREFIX=/usr/local PYVERSION=3.2 fetch deps mpl_build mpl_install

我意识到matplotlib还没有在Python 3上得到官方支持,但我认为也许某个人至少设法让它进行编译/安装?

任何帮助将非常感激,

亚当.

我已经包含了以下错误:

basedirlist is: ['/usr/local']
============================================================================
BUILDING MATPLOTLIB
            matplotlib: 1.2.x
                python: 3.2.2 (v3.2.2:137e45f15c0b, Sep  3 2011, 17:28:59)
                        [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
              platform: darwin

REQUIRED DEPENDENCIES
                 numpy: 1.6.2rc1
             freetype2: found, but unknown version (no …
Run Code Online (Sandbox Code Playgroud)

numpy matplotlib python-3.x osx-lion

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

vi - 收到错误E212:无法打开文件进行写入

我正在按照本教程为git设置opendiff:http://thomashunter.name/blog/set-opendiff-filemerge-as-your-git-diff-tool-on-os-x/

我打开vi就像在教程中说的那样,写一些行并尝试:wq但是得到错误 - 错误E212:无法打开文件写入

我浏览了一下堆栈溢出,并试着打字

sudo vim ~/bin/git-diff.sh
Run Code Online (Sandbox Code Playgroud)

但我也得到了同样的错误.

我对基于unix的系统没有多少经验,所以我该怎么办?

unix vim osx-lion

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

在Lion上安装Scrapy - libxml/xmlversion.h不可用

我使用家酿和安装python与$ brew install python --framework 然后我安装easy_install安装点,

之后,如Scrapy网站所说,我使用pip install来安装Scrapy,但看起来XCode缺少一些libxml文件.

In file included from src/lxml/lxml.etree.c:314:

/private/var/folders/h6/xl6c12wn67n_9j7jl60b_j843908_z/T/pip-build-auduwage/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found

#include "libxml/xmlversion.h"

         ^

1 error generated.

error: command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

python scrapy osx-lion

1
推荐指数
2
解决办法
2837
查看次数