我有干净的 10.8 OS X (带有 Retina MacBook Pro)。
我的情况和这里完全一样 卸载后无法在 OS X Leopard 上重新安装 MySQL
和类似的东西 https://stackoverflow.com/questions/5067787/re-install-mysql-in-mac-os-x-10-6-6
但在最后一种情况下我已经有用户 mysql 了。
当我尝试从包中安装它时,我在系统日志中看到下一条消息
Aug 22 08:08:29 --- last message repeated 1 time ---
Aug 22 08:08:29 nnn-laptop.local CoreServicesUIAgent[317]: Error: qtn_file_apply_to_path error: Read-only file system
Aug 22 08:08:29 nnn-laptop.local Installer[315]: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.
Aug 22 08:08:53 --- last message repeated 3 times ---
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_authenticate(): Got user: nnn
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_authenticate(): Got ruser: (null)
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_authenticate(): Got service: authorization
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in od_principal_for_user(): No authentication authority returned
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in od_principal_for_user(): failed: 7
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_authenticate(): Failed to determine Kerberos principal name.
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_authenticate(): Done cleanup3
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_authenticate(): Kerberos 5 refuses you
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_authenticate(): pam_sm_authenticate: ntlm
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_acct_mgmt(): OpenDirectory - Membership cache TTL set to 1800.
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in od_record_check_pwpolicy(): retval: 0
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in od_record_attribute_create_cfstring(): returned 2 attributes for dsAttrTypeStandard:AuthenticationAuthority
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Establishing credentials
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Got user: nnn
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Context initialised
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Got euid, egid: 0 0
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Done getpwnam()
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Done setegid() & seteuid()
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): pam_sm_setcred: krb5 user nnn doesn't have a principal
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Done cleanup3
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Done seteuid() & setegid()
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): Done cleanup4
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): pam_sm_setcred: ntlm
Aug 22 08:08:53 nnn-laptop.local authorizationhost[323]: in pam_sm_setcred(): pam_sm_setcred: no domain found skipping
Aug 22 08:08:53 nnn-laptop.local com.apple.SecurityServer[15]: UID 501 authenticated as user nnn (UID 501) for right 'system.install.software'
Aug 22 08:08:53 nnn-laptop.local com.apple.SecurityServer[15]: Succeeded authorizing right 'system.install.software' by client '/System/Library/PrivateFrameworks/Install.framework/Versions/A/Resources/runner' [321] for authorization created by '/System/Library/CoreServices/Installer.app' [315] (100003,0)
Aug 22 08:08:53 nnn-laptop.local coreservicesd[33]: Application App:"Установщик" [ 0x0/0x34034] @ 0x0x7fcdfad21b70 tried to be brought forward, but isn't in fPermittedFrontASNs ( ( ASN:0x0-0x36036:) ), so denying.
Aug 22 08:08:53 nnn-laptop.local WindowServer[77]: [cps/setfront] Failed setting the front application to Установщик, psn 0x0-0x34034, securitySessionID=0x186a6, err=-13066
Aug 22 08:08:53 nnn-laptop.local com.apple.SecurityServer[15]: Succeeded authorizing right 'system.install.apple-software' by client '/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/Resources/installd' [324] for authorization created by '/System/Library/CoreServices/Installer.app' [315] (4,0)
Aug 22 08:08:53 nnn-laptop.local com.apple.SecurityServer[15]: Succeeded authorizing right 'system.install.software' by client '/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/Resources/installd' [324] for authorization created by '/System/Library/CoreServices/Installer.app' [315] (4,0)
Aug 22 08:08:57 nnn-laptop.local com.apple.SecurityServer[15]: Succeeded authorizing right 'com.apple.ServiceManagement.daemons.modify' by client '/usr/libexec/UserEventAgent' [11] for authorization created by '/usr/libexec/UserEventAgent' [11] (100012,0)
Aug 22 08:08:57 nnn-laptop.local installd[330]: *** NSTask: Task create for path '/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg/Contents/Resources/preflight' failed: 22, "Invalid argument". Terminating temporary process.
Aug 22 08:08:57 nnn-laptop kernel[0]: exec of /Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg/Contents/Resources/preflight denied since it was quarantined by Safari and created without user consent, qtn-flags was 0x00000006
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: DebugSymbols was unable to start a spotlight query: spotlight is not responding or disabled.
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Aug 22 08:08:57 nnn-laptop.local ReportCrash[331]: Saved crash report for installd[330] version 241 to /Library/Logs/DiagnosticReports/installd_2012-08-22-080857_nnn-laptop.crash
Aug 22 08:08:58 nnn-laptop.local com.apple.SecurityServer[15]: Succeeded authorizing right 'com.apple.ServiceManagement.daemons.modify' by client '/usr/libexec/UserEventAgent' [11] for authorization created by '/usr/libexec/UserEventAgent' [11] (100012,0)
Aug 22 08:08:58 nnn-laptop.local Installer[315]: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.
Aug 22 08:08:58 nnn-laptop.local Installer[315]: Установщик обнаружил ошибку, вызвавшую сбой установки. Обратитесь за помощью к производителю ПО.
我觉得那个地方有问题
Aug 22 08:08:57 nnn-laptop.local installd[330]: *** NSTask: Task create for path '/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg/Contents/Resources/preflight' failed: 22, "Invalid argument". Terminating temporary process.
但预检内容是:
#!/bin/sh
#
# preflight - this script will be executed before the MySQL PKG
# installation will be performed.
#
# If this package has been compiled with a prefix ending with "mysql" (e.g.
# /usr/local/mysql or /opt/mysql), it will rename any previously existing
# directory with this name before installing the new package (which includes
# a symlink named "mysql", pointing to the newly installed directory, which
# is named mysql-<version>)
#
PREFIX="/usr/local/mysql"
BASENAME=`basename $PREFIX`
if [ -d $PREFIX -a ! -L $PREFIX -a $BASENAME = "mysql" ] ; then
mv $PREFIX $PREFIX.bak
fi
最后一行是18,没有任何第22行。
答案1
看来这个错误与 Apple 隔离下载的应用程序有关。通常它会显示一个对话框,但如果无法显示,则会阻止应用程序启动。
指示线为:
Aug 22 08:08:57 nnn-laptop kernel[0]: exec of /Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg/Contents/Resources/preflight denied since it was quarantined by Safari and created without user consent, qtn-flags was 0x00000006
您可以尝试将包从磁盘映像中复制出来,然后xattr -dr mysql-5.5.27-osx10.6-x86_64.pkg
在包上运行。请参阅这个帖子更多细节。