刚安装的Pharo.image无法按教程保存及Linux部署命令报错求助
Answers to Your Pharo Questions
1. Why can't I save my newly installed Pharo.image following the tutorial steps?
Let’s walk through the most likely causes and fixes for this issue:
- Permission restrictions: If you used
sudoto install Pharo, yourPharo.imagefile might be owned by therootuser, which blocks your regular account from modifying it. Here’s how to fix it:- Check the file’s owner and permissions with
ls -l Pharo.image— the first column shows permissions, and the third/fourth columns show the owner and group. - Transfer ownership to your user with
chown your_username:your_group Pharo.image(replace placeholders with your actual Linux user details). - Or, directly grant write access to yourself with
chmod u+w Pharo.image.
- Check the file’s owner and permissions with
- Tutorial vs. Pharo version mismatch: Pharo’s GUI menu layout changes between versions. Older tutorials might reference
File > Save Image, but newer releases could have this option underPharo > Save Image As.... Verify your Pharo version (check the welcome screen or runSmalltalk versionin the playground) and cross-reference it with the tutorial’s specified version. - Corrupted image file: Interrupted downloads can lead to a broken image. Try re-downloading the Pharo image from the official release page, making sure to pick the version matching your tutorial.
2. Why do I get "no such file or directory" when running ./pharo Pharo.image save myApp on a Linux server?
This error typically stems from path issues or missing components. Let’s troubleshoot:
- Incorrect working directory: You’re probably running the command from a folder that doesn’t contain both the
pharostartup script andPharo.image. First navigate to the correct directory withcd /path/to/your/pharo/install/folder, then re-run the command. Alternatively, use absolute paths for both the script and image:/full/path/to/pharo /full/path/to/Pharo.image save myApp - Missing startup script or VM: If you only uploaded the
Pharo.imagefile to the server (and not the full Pharo distribution), you’re missing thepharostartup script and required virtual machine (VM) files. Make sure to upload the entire Pharo package — including thepharoscript,pharo-vmfolder, and associated files — to your server. - Case-sensitive filename mistake: Linux treats filenames as case-sensitive! Double-check that you’re typing
Pharo.imageexactly as the file is named (e.g.,pharo.imagewith a lowercase p will cause a failure). Uselsto confirm the exact filename. - VM architecture mismatch: If you downloaded a Pharo build for a different architecture than your server (e.g., x86_64 vs. ARM), the VM won’t run, and the startup script will throw this error. Ensure you’ve downloaded the correct build for your server’s architecture.
内容的提问来源于stack exchange,提问作者ludo
相关产品推荐
相关产品推荐

