无法打开应用程序,因为其可执行文件丢失 [英] The application cannot be opened because its executable is missing

查看:789
本文介绍了无法打开应用程序,因为其可执行文件丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我已经开发了一段时间的应用程序。最近通过双击启动应用程序会显示一个对话框,其中显示您无法打开应用程序RepoWatch,因为它可能已损坏或不完整。

I have an application that I have been developing for some time now. Recently launching the application via a double click presents a dialog that says "You can't open the application RepoWatch because it may be damaged or incomplete."

启动应用程序打开./RepoWatch.app给我应用程序无法打开,因为它的可执行文件丢失。

Launching the application via open ./RepoWatch.app gives me "The application cannot be opened because its executable is missing."

我通常通过./RepoWatch.app/Contents/启动应用程序MacOS / RepoWatch只是出于习惯(这是DOES工作),所以我不确定这发生了多长时间,或什么改变发生在手之前。最可能的更改是,我把 cp Info.plist ./RepoWatch.app/Contents / 到我的make文件为了版本Info.plist没有版本控制的一切。应用程序包。

I usually launch the application via ./RepoWatch.app/Contents/MacOS/RepoWatch simply out of habit (which DOES work), so I am unsure how long this has been happening, or what change happened immediately before hand. The most likely change is that I put cp Info.plist ./RepoWatch.app/Contents/ into my make file in order to version Info.plist without versioning everything in the .app bundle.

我已经看过Info.plist多次,找不到任何错误。该文件随属性列表编辑器打开,没有任何错误。从属性列表编辑器保存不会使文件工作(如果它是在第一位)。

I have looked at Info.plist many times and cannot find anything wrong with it. The file opens up with Property List Editor without any errors. Saving from Property List Editor does not make the file "work" (if it is to blame in the first place).

权限,尽管我可以告诉也看sane:

The permissions as far as I can tell also look sane:

$ ls -l
./RepoWatch.app/Contents/Info.plist
-rw-rw-r--@ 1 dgrace  staff  789 Feb  1 23:20 ./RepoWatch.app/Contents/Info.plist
$ ls -l
/Applications/Adium.app/Contents/Info.plist
-rw-rw-r--  1 dgrace  staff 5750 Aug 21 15:41 /Applications/Adium.app/Contents/Info.plist

我对下一步做什么感到失落。

I am at a loss as to what to try next.

这里是Info.plist的内容(即使在一段时间没有任何改变):

And here are the contents of Info.plist (Even though nothing has really changed in quite a while):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>RepoWatch</string>
    <key>CFBundleIdentifier</key>
    <string>com.doomstick.RepoWatch</string>
    <key>CFBundleName</key>
    <string>RepoWatch</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>LSMinimumSystemVersion</key>
    <string>10.6</string>
    <key>CFBundleVersion</key>
    <string>Beta26</string>
    <key>NSMainNibFile</key>
    <string>MainMenu</string>
    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
</dict>
</plist>


推荐答案

重建Launch Services数据库为我解决了这个问题。

Rebuilding the Launch Services database solves this problem for me.

尝试在Terminal中执行以下命令:

Try executing the following command in Terminal:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

这篇关于无法打开应用程序,因为其可执行文件丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆