IBM MobileFirst CLI 7.1在MacOS下安装失败求助
Looks like you ran into a couple of common snags installing IBM MobileFirst CLI 7.1 on macOS High Sierra—let’s break this down and fix them step by step, using your installation logs and behavior details as a guide.
1. Fix the Initial "No Installer Popup" Problem
Your first issue (clicking install_mac did nothing) is almost certainly caused by macOS App Translocation, a security feature that isolates unsigned apps downloaded from the web into a temporary, restricted directory. This is why your log shows the installer hunting for files in /private/var/folders/.../AppTranslocation/....
Here’s how to get around it:
- Move the entire MobileFirst CLI installation folder out of your
Downloadsdirectory (this folder triggers translocation frequently) into eitherApplicationsorDocuments. - Right-click
install_macand select Open—you’ll get a security prompt, click "Open" again to confirm trust. This bypasses Gatekeeper restrictions that might block the installer from launching.
2. Resolve Archive Extraction & Missing File Warnings
The warnings in your log (missing .jar files, failed archive extraction, broken template copies) point to either a corrupted installation package or insufficient permissions during setup. Let’s tackle this:
Step 2.1: Clean Up the Partial Installation
First, wipe the partially installed directory to start fresh:
sudo rm -rf /Applications/IBM/MobileFirst-CLI
Step 2.2: Re-Download & Verify the Install Package
The "unknown archive type" warning suggests your downloaded package might be corrupted mid-download:
- Delete your current MobileFirst CLI download and re-download the 7.1 package (make sure the download finishes without interruptions).
- After downloading, right-click the zip file and select Open to extract it—stick with macOS’s built-in unarchiver, third-party tools can sometimes mess up the package structure.
Step 2.3: Fix Directory Permissions
macOS’s strict permission rules can prevent the installer from copying files properly. Run these commands in Terminal to create the target directory with the right access:
sudo mkdir -p /Applications/IBM/MobileFirst-CLI sudo chmod -R 755 /Applications/IBM/MobileFirst-CLI
Step 2.4: Re-Run the Installer
Now launch the installer again by right-clicking install_mac and selecting Open. This should resolve most of the missing file warnings.
3. Manual File Fix (If Warnings Stick Around)
If you still see missing file warnings after the above steps, manually copy the required files from the extracted installation package:
- Open the extracted installer folder, navigate to
Contents/Resources, and extractmobilefirst-cli-7.1.0-install.zip. - From the extracted zip, copy these files to
/Applications/IBM/MobileFirst-CLI/public/:mobilefirst-cli/node_modules/generator-worklight-server/ant-tools/worklight-ant-builder.jarmobilefirst-cli/node_modules/generator-worklight/project/templates/project/externalServerLibraries/com.ibm.worklight.oauth.tai_1.0.0.jarmobilefirst-cli/node_modules/generator-worklight/project/templates/project/externalServerLibraries/OAuthTai-1.0.mfmobilefirst-cli/node_modules/generator-worklight/project/templates/project/externalServerLibraries/mfp-xs-loader.jar
- Copy the template folder:
- Copy
mobilefirst-cli/node_modules/cordovacmd/cordova/templates/cordova-hello-world-mfpto/Applications/IBM/MobileFirst-CLI/public/cordova/templates/
- Copy
4. Confirm Installation Success
After installation, open Terminal and run:
mfp --version
If this returns 7.1.0, your CLI is working correctly. The warnings you saw relate to optional components (Ant build tools, OAuth TAI, Cordova templates)—if you don’t use these features, core CLI functionality will still work. Fixing them just ensures full functionality across all use cases.
内容的提问来源于stack exchange,提问作者Long Phan

