我在Google Compute Engine上执行Debian 7.2(虽然我怀疑Centos,Red Hat和Amazon Linux AMI都有相同的问题)。从此网页下载64位Linux版本的Dart SDK后,我运行的任何dart命令, dart --version 将输出以下错误:
。 / editor / dart / dart-sdk / bin / dart:/lib/x86_64-linux-gnu/libc.so.6:未找到版本`GLIBC_2.15'(./editor/dart/dart-sdk/bin需要/ dart) ./editor/dart/dart-sdk/bin/dart:/lib/x86_64-linux-gnu/libc.so.6:找不到版本`GLIBC_2.14'(./editor需要) / dart / dart-sdk / bin / dart)解决方案
更新:2014年10月:Dart现在可以使用apt-get安装在Debian上:
dart网站:
#为apt启用HTTPS。 sudo apt-get update sudo apt-get install apt-transport-https #获取Google Linux软件包签名密钥。 sudo sh -c'curl dl-ssl.google/linux/linux_signing_key.pub | apt-key add - ' #设置稳定存储库的位置。 sudo sh -c'curl storage.googleapis/download.dartlang/linux/debian/dart_stable.list> /etc/apt/sources.list.d/dart_stable.list' sudo apt-get update #最后,安装dart包! sudo apt-get install dart/ strong>
这个问题似乎是谷歌编译GLIBC(> = 2.15)的边缘版本,这是Ubuntu 12之外的Linux精确穿山甲)。
首先,不要尝试下载GLIBC或EGLIBC的实验版本。我能够使用该方法飞镖,但我的机器的其余部分分开。更新GLIBC是疯狂的食谱。
相反,最好的解决方案是从源码构建dart。尽管二进制的GLIBC版本要求,源本身没有这样的要求。有从 debian 安装的wiki页面, centos / fedora / red hat / amazon , ubuntu 和其他linux版本。
这里是这些步骤的概述,我可以确认在Debian 7.2上的作品。除了使用yum而不是apt-get,centos / fedora / redhat步骤看起来是一样的。
安装subversion和所需的构建工具:
sudo apt-get -y update sudo apt- get -y install subversion sudo apt-get -y install make sudo apt-get -y install g ++ sudo apt-get -y install openjdk-6-jdk p>查看google的软件仓库工具并将gclient添加到您的路径 b $ b
svn co src.chromium/svn/trunk/tools/depot_tools export PATH = $ PATH:`pwd `/ depot_tools
在所需的分支机构下载dart源。
-
将1.2替换为您要构建的分支。您可以在此处查看可用版本的列表。一般来说,最新编号的分支是最好的。
gclient config dart.googlecode/svn/branches/ 1.2 / deps / all.deps gclient sync gclient runhooks
移至新的dart目录
cd dart仅在下面执行A或B: p>
-
注意:对于32位,请改用 - arch = ia32
。构建整个Dart SDK,包括pub,dart2js,dart等: $ b $ tools / build.py --mode = release --arch = x64 create_sdk c $ c> tools / build.py --mode = release --arch = x64 runtime
dart可执行文件现在处于/ ReleaseX64 / dart或out / ReleaseX64 / dart-sdk / bin / dart,您可以通过打印版本
dart / out / ReleaseX64 / dart --version输出应该是 Dart VM version:1.2.0(Mon Mar 3 03:06:20 2014)on linux_x64。
如何帮助解决此问题
这是比它需要的更痛苦,因为二进制明显不需要使用GLIBC> = 2.15来构建。如果您想提请注意此问题,请将此飞镖错误标记为星号。
I'm running Debian 7.2 on Google Compute Engine (Though I suspect Centos, Red Hat, and Amazon Linux AMI all have the same problem). After downloading the 64-bit Linux version of the Dart SDK from this page, any dart command I run, for example, dart --version, will output the following error:
./editor/dart/dart-sdk/bin/dart: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by ./editor/dart/dart-sdk/bin/dart) ./editor/dart/dart-sdk/bin/dart: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./editor/dart/dart-sdk/bin/dart)解决方案
Update: October 2014: Dart can now be installed on Debian with apt-get:
Instructions summarized from the dart website:
# Enable HTTPS for apt. sudo apt-get update sudo apt-get install apt-transport-https # Get the Google Linux package signing key. sudo sh -c 'curl dl-ssl.google/linux/linux_signing_key.pub | apt-key add -' # Set up the location of the stable repository. sudo sh -c 'curl storage.googleapis/download.dartlang/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' sudo apt-get update # Finally, install the dart package! sudo apt-get install dartInstructions for building the binary yourself:
This problem appears to be caused by Google compiling against an edge version of GLIBC (>= 2.15) which is not generally supported on Linux outside of Ubuntu 12 (Precise Pangolin).
First of all, do not attempt to download an experimental version of GLIBC or EGLIBC. I was able to get dart to work using that method, but the rest of my machine fell apart. Updating GLIBC is a recipe for madness.
Instead, the best solution is building dart from source. Despite the GLIBC version requirements of the binary, the source itself has no such requirements. There are wiki pages for installing from source on debian, centos/fedora/red hat/amazon, ubuntu, and other linux versions.
Here is an overview of those steps, which I can confirm works on Debian 7.2. The centos/fedora/redhat steps appear to be the same except they use yum instead of apt-get.
Install subversion and the required build tools:
sudo apt-get -y update sudo apt-get -y install subversion sudo apt-get -y install make sudo apt-get -y install g++ sudo apt-get -y install openjdk-6-jdkCheck out google's depot tools and add gclient to your path
svn co src.chromium/svn/trunk/tools/depot_tools export PATH=$PATH:`pwd`/depot_toolsDownload the dart source at the desired branch.
Replace 1.2 with whatever branch you wish to build. You can see a list of available versions here. In general, the latest numbered branch is best.
gclient config dart.googlecode/svn/branches/1.2/deps/all.deps gclient sync gclient runhooks
Move into the new dart directory
cd dartDo only A or B below:
Note: For 32bit, use the --arch=ia32 flag instead.
A. Build the entire Dart SDK including pub, dart2js, dart, etc.:
tools/build.py --mode=release --arch=x64 create_sdkB. Build just the dart executable:
tools/build.py --mode=release --arch=x64 runtime
The dart executable is now at either out/ReleaseX64/dart or out/ReleaseX64/dart-sdk/bin/dart you can do a smoke test by printing the version
dart/out/ReleaseX64/dart --versionThe output should be something like Dart VM version: 1.2.0 (Mon Mar 3 03:06:20 2014) on "linux_x64".
How to help fix this issue
This was much more painful than it needed to be, since the binary clearly doesn't need to be built using GLIBC >= 2.15. If you wish to draw attention to this issue, please star this dart bug.
更多推荐
Dart在linux上抛出错误:GLIBC
发布评论