简体   繁体   English

无法在Github上运行Unisubs(amara)存储库

[英]Cannot run the Unisubs (amara) repo on Github

E: Some index files failed to download. E:某些索引文件下载失败。 They have been ignored, or old ones used instead. 它们已被忽略,或改用旧的。 The command ' /bin/sh -c apt-get update ' returned a non-zero code: 100 " 命令' /bin/sh -c apt-get update '返回non-zero code: 100

  • I created an issue for that repo but its owner said that it doesn't seem like the repo issue, but the ubuntu packages or docker base image issue. 我为该存储库创建了一个问题,但它的所有者表示这似乎不像该存储库问题,而是ubuntu软件包或docker base image问题。 Then he closed this issue. 然后,他结束了这个问题。
  • Then Mr. Google guided me to add a line of code: " RUN rm /var/lib/apt/lists/* -vf " before " RUN apt-get update " in the Dockerfile file. 然后,谷歌先生指导我在Dockerfile文件中的“ RUN apt-get update ”之前添加一行代码:“ RUN rm /var/lib/apt/lists/* -vf ”。 But still no luck. 但是仍然没有运气。 I still got the same error. 我仍然遇到相同的错误。

Could anyone tell me how I can fix it to run this repo? 谁能告诉我如何解决此仓库? Thank you so much. 非常感谢。

Update 1 : 更新1

Hi, I found the cause of this issue. 嗨,我找到了这个问题的原因。 It's because of my internet provider who bans some download urls. 这是因为我的互联网提供商禁止了某些下载网址。 I switched to another internet provider and ran step 3: bin/dev build successfully, although there was another issue at this step "Setting up ca-certificates-java" which I solved using "overlay" machine thanks to this topic: https://github.com/docker/docker/issues/18180 -> But now I come up with another issue at step 4: bin/dev up -> The error is below: " Creating unisubs20160121_cache_1 Creating unisubs20160121_queue_1 Creating unisubs20160121_db_1 Creating unisubs20160121_worker_1 Creating unisubs20160121_app_1 Attaching to unisubs20160121_worker_1, unisubs20160121_app_1 worker_1 | /usr/bin/python: can't open file 'manage.py': [Errno 2] No such file or directory unisubs20160121_worker_1 exited with code 2 app_1 | /usr/bin/python: can't open file 'manage.py': [Errno 2] No such file or directory unisubs20160121_app_1 exited with code 2 " 我切换到另一个Internet提供商并运行了第3步:成功完成了bin / dev的构建,尽管在这一步中还有另一个问题“设置ca-certificates-java”,由于这个主题,我使用“覆盖”计算机解决了这个问题: https:// /github.com/docker/docker/issues/18180- >但现在我在第4步提出另一个问题:bin / dev up->错误在下面:“创建unisubs20160121_cache_1创建unisubs20160121_queue_1创建unisubs20160121_db_1创建unisubs20160121_worker_1创建unisubs20160121_app_1 unisubs20160121_worker_1,unisubs20160121_app_1 worker_1 | / usr / bin / python:无法打开文件'manage.py':[错误2]没有此类文件或目录unisubs20160121_worker_1退出,代码为2 app_1 | / usr / bin / python:无法打开文件'manage.py':[错误2]没有退出此类文件或目录unisubs20160121_app_1,其代码为2“

I guest the command: "bin/dev up" wants to execute file manage.py which does not exist in folder bin/dev. 我接受命令:“ bin / dev up”要执行文件夹bin / dev中不存在的文件manage.py。 Another weird thing I notice is that after running step 3: "bin/dev build" successfully, there's no new files generated in folder bin/dev. 我注意到的另一件奇怪的事情是,成功运行了步骤3:“ bin / dev build”之后,文件夹bin / dev中没有生成新文件。 Could anyone please help me to figure this step out? 有人可以帮我弄清楚这一步吗? Thanks in advance. 提前致谢。

Edit: this is probably wrong... 编辑:这可能是错误的...

I believe the problem is the Dockerfile is structured incorrectly. 我相信问题在于Dockerfile的结构不正确。

It's documented in best practices that any apt-get install should have an apt-get update before it as part of the same RUN directive. 最佳实践中已记录到,任何apt-get install都应在其之前作为同一RUN指令的一部分进行apt-get update

The reason for this, as you've discovered, is that if you don't you end up in a situation where the update is cached, but the upstream packages have changed, so when you try to install, the build fails. 正如您所发现的,这样做的原因是,如果不这样做,您最终会遇到缓存了update但上游软件包已更改的情况,因此当您尝试安装时,构建会失败。

A temporary solution is to run with --no-cache docker build --no-cache ... . 临时解决方案是使用--no-cache docker build --no-cache ...

The real solution is to fix the Dockerfile. 真正的解决方案是修复Dockerfile。

Problem solved by...switching to SubtitleEdit . 通过...切换到SubtitleEdit解决了问题。 Not using Unisubs (Amara) project anymore as there's bunch of issues to run it. 不再使用Unisubs(Amara)项目,因为存在很多问题要运行它。 Thanks all for your answers :). 谢谢大家的回答:)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM