我從git得到了Atom(從https://github.com/atom/atom),並在前一段時間檢出了1.5.0-beta0版本,當時我建立了一個32位的deb;我在Ubuntu 14.04上。從源代碼構建舊版本的Atom文本編輯器?
現在,我想建立完全相同的版本,作爲一個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
我認爲,它不可能是,是的構建系統不能與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 [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✓
Installing [email protected] ✗
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 [email protected] ✗
Package version: 0.88.0 not found
該死的 - 它發現[email protected],它刪除它!我如何說服現在的構建過程,不要在線尋找[email protected]
,而是使用我提供給它的那個,所以構建腳本可以繼續構建?