【发布时间】:2017-04-23 18:04:02
【问题描述】:
我从 git(来自https://github.com/atom/atom)获得了 Atom,并在不久前检查了 1.5.0-beta0 版本,当时我用它构建了一个 32 位的 deb;我在 Ubuntu 14.04 上。
现在,我想构建与 64 位 deb 完全相同的版本。我以为会很直接,所以就在git源码文件夹下发了:
script/build
script/grunt mkdeb
这为我构建了一个/tmp/atom-build/atom-1.5.0-beta0-amd64.deb,但当我安装它时,它告诉我:
/usr/share/atom/atom: error while loading shared libraries: libnotify.so.4: cannot open shared object file: No such file or directory
...这很奇怪,因为在我的 64 位系统上:
$ locate libnotify.so.4
/usr/lib/x86_64-linux-gnu/libnotify.so.4
/usr/lib/x86_64-linux-gnu/libnotify.so.4.0.0
我想,这不可能,atom 的构建系统无法区分 32 位和 64 位构建?但结果确实如此,因为我尝试了LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu atom,它给了我一些错误(编辑:很可能是:“/usr/share/atom/atom: error while loading shared libraries: libnotify.so.4: wrong ELF class: ELFCLASS64”),这表明它可能确实有这个问题......
太好了。好的,现在我先尝试清洁:
script/clean
script/build
现在,当我在这里通过无线网络进行构建时,npm(或apm)会完全阻塞我的互联网连接,最终产生如下消息:
....
Installing build modules...
npm ERR! fetch failed https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.5.0.tgz
....
此时,如果我尝试在 Firefox 中加载页面,那么它将一直在旋转,并且永远不会加载页面。
于是,我从无线改成了有线,终于搞定了:
atom_git$ script/clean
atom_git$ script/build
Node: v4.0.0
npm: v2.14.2
Installing build modules...
=> Took 94239ms.
Installing apm...
=> Took 67760ms.
Deleting old packages...
=> Took 418ms.
Installing modules ✓
Installing atom-dark-syntax@0.27.0 ✓
Installing atom-dark-ui@0.51.0 ✓
Installing atom-light-syntax@0.28.0 ✓
Installing atom-light-ui@0.43.0 ✓
Installing base16-tomorrow-dark-theme@1.1.0 ✓
Installing base16-tomorrow-light-theme@1.1.1 ✓
Installing one-dark-ui@1.1.9 ✓
Installing one-light-ui@1.1.9 ✓
Installing one-dark-syntax@1.1.2 ✓
Installing one-light-syntax@1.1.2 ✓
Installing solarized-dark-syntax@0.39.0 ✓
Installing solarized-light-syntax@0.23.0 ✓
Installing about@1.3.0 ✓
Installing archive-view@0.61.0 ✓
Installing autocomplete-atom-api@0.9.2 ✓
Installing autocomplete-css@0.11.0 ✓
Installing autocomplete-html@0.7.2 ✓
Installing autocomplete-plus@2.25.0 ✓
Installing autocomplete-snippets@1.9.0 ✓
Installing autoflow@0.26.0 ✓
Installing autosave@0.23.0 ✓
Installing background-tips@0.26.0 ✓
Installing bookmarks@0.38.0 ✓
Installing bracket-matcher@0.79.0 ✓
Installing command-palette@0.38.0 ✓
Installing deprecation-cop@0.54.0 ✓
Installing dev-live-reload@0.47.0 ✓
Installing encoding-selector@0.21.0 ✓
Installing exception-reporting@0.37.0 ✓
Installing find-and-replace@0.195.0 ✓
Installing fuzzy-finder@0.94.0 ✓
Installing git-diff@0.57.0 ✓
Installing go-to-line@0.30.0 ✓
Installing grammar-selector@0.48.0 ✓
Installing image-view@0.56.0 ✓
Installing incompatible-packages@0.25.0 ✓
Installing keybinding-resolver@0.33.0 ✓
Installing line-ending-selector@0.3.0 ✓
Installing link@0.31.0 ✓
Installing markdown-preview@0.157.1 ✓
Installing metrics@0.53.1 ✓
Installing notifications@0.62.1 ✓
Installing open-on-github@0.40.0 ✓
Installing package-generator@0.41.0 ✓
Installing settings-view@0.232.3 ✓
Installing snippets@1.0.1 ✓
Installing spell-check@0.65.0 ✓
Installing status-bar@0.80.0 ✓
Installing styleguide@0.45.0 ✓
Installing symbols-view@0.110.1 ✓
Installing tabs@0.88.0 ✗
Package version: 0.88.0 not found
... 现在这里的构建过程停止了。我想该死的 - 我怎么能从源代码构建,现在他们依赖于互联网上不断被删除的包?但后来我浏览了一下,发现https://github.com/atom/tabs/releases/tag/v0.88.0 - 很好;所以我尝试了这个:
cd /tmp
wget https://github.com/atom/tabs/archive/v0.88.0.zip
unzip v0.88.0.zip
cd /path/to/atom_git
mv /tmp/tabs-0.88.0 ./node_modules/
...并再次尝试构建:
atom_git$ script/build
Node: v4.0.0
npm: v2.13.3
Installing build modules...
=> Took 3473ms.
Installing apm...
=> Took 1122ms.
Deleting old packages...
Removing tabs-0.88.0 ✓
=> Took 1290ms.
Installing modules ✓
Installing tabs@0.88.0 ✗
Package version: 0.88.0 not found
该死的——它找到了 tabs@0.88.0,然后把它删除了!!我如何说服现在的构建过程,不要在网上寻找tabs@0.88.0,而是使用我提供给它的那个,以便构建脚本可以继续构建?
【问题讨论】: