You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为Apertium翻译对构建Jar文件报错求助:文件存在却提示找不到

Fixing "No such file or directory" Error with apertium-pack-j

Hey there! As an Apertium newbie, it’s super frustrating when you know the file exists but the tool insists it doesn’t—let’s sort this out step by step.

First, let’s recap the confusing error you’re hitting:

cp: cannot stat ''''/home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/ca-it.automorf.bin'''': No such file or directory
zip warning: name not matched: data/ca-it.automorf.bin

Notice those weird ''\'' characters wrapped around the file path? That’s a big clue—something’s messing up how the command parses the path to your .bin file. Here’s what to check and fix:

1. Inspect your .mode file for path formatting issues

Open ca-it.mode in a text editor and look for lines that reference ca-it.automorf.bin. Chances are, the path in the mode file has extra quotes or escape characters that are breaking the apertium-pack-j tool. For example, if it’s written like "/home/.../ca-it.automorf.bin" (with quotes), that might cause the tool to misread the path as a string with extra garbage characters.

Fix it by stripping any unnecessary quotes around the file paths in the mode file, leaving just the raw absolute path (like /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/ca-it.automorf.bin).

2. Verify the file path manually

Double-check that the file really is where you think it is by running this in your terminal:

ls /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/ca-it.automorf.bin

If this command outputs the filename, you know the path is correct. If not, you might have a typo (check for missing directories, misspelled filenames, or case sensitivity—Linux paths are case-sensitive!).

3. Clean up your command input

Sometimes when copying commands from other sources, you might accidentally pick up smart quotes or hidden formatting that adds those stray ''\'' characters. Try typing the apertium-pack-j command manually instead of pasting it:

./apertium-pack-j /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/modes/ca-it.mode

This avoids any weird formatting that could be corrupting the path.

4. Check file permissions

Make sure your apertium user has read access to the .bin file. Run this to check:

ls -l /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/ca-it.automorf.bin

Look at the permission string (the first column, like -rw-r--r--). If the third group (other users) has a r (read) permission, you’re good. If not, fix it with:

chmod o+r /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/ca-it.automorf.bin

5. Try packing files directly (bypass the mode file)

If the mode file is still causing issues, you can pass the required .bin files directly to apertium-pack-j along with the mode file. For example:

./apertium-pack-j /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/ca-it.automorf.bin /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/ca-it.autobil.bin /home/apertium/apertium-trunk/apertium-svn/apertium-ca-it1/modes/ca-it.mode

Just add all the necessary .bin files your language pair uses before the mode file path.

Most likely, the issue is extra quotes or escape characters in your mode file—fixing that should get the pack tool working correctly.

内容的提问来源于stack exchange,提问作者Praveen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:56:10