在 Ubuntu 上安装 Meteor 时遇到问题



我看到很多人在我之前在 Ubuntu 上安装 Meteor 时遇到问题,但我还没有看到我在这里遇到的特定错误,所以我正在写一篇新帖子。 当我执行时:

curl https://install.meteor.com/ | sh

我得到:

Warning: Failed to create the file /home/ubuntu/.meteor-tarball-tmp:          
Warning: Permission denied
     
0.0%curl: (23) Failure writing output to destination

如果你们中的任何人知道如何解决这个问题,请告诉我

您的主目录(假设您是用户ubuntu)似乎不属于您。请尝试sudo chown -R ubuntu:ubuntu /home/ubuntu,然后重试。

我刚刚在运行时遇到了同样的错误......

curl https://install.meteor.com/ | sh

。在新安装的 Ubuntu 20.04 系统上。在尝试了一些更简单的方法并失败后,包括Minh Nguyen和Christian Fritz在这里建议的方法,我最终选择了以下手动安装过程。

  1. 我在浏览器中访问了 https://install.meteor.com/,并将安装脚本复制并粘贴到文本编辑器中。

  2. 我将文件保存为meteor-install.sh

  3. 我从终端以调试模式运行脚本:bash -x ./meteor-install.sh

  4. 在终端窗口的输出中,我找到了以下行:

+ curl --progress-bar --fail --continue-at - https://s3.amazonaws.com/com.meteor.static/packages-bootstrap/2.3.4/meteor-bootstrap-os.linux.x86_64.tar.gz --output /home/blackslate/.meteor-tarball-tmp
curl: Can't open '/home/blackslate/.meteor-tarball-tmp'!
  1. 这给了我脚本无法下载的文件的链接。就我而言,这https://s3.amazonaws.com/com.meteor.static/packages-bootstrap/2.3.4/meteor-bootstrap-os.linux.x86_64.tar.gz,但您可能对版本号 (2.3.4) 和操作系统 (linux) 有不同的值。

  2. 我下载了这个文件并提取了它的内容:一个名为.meteor的隐藏文件夹

  3. 我用mv .meteor "$HOME"将其移动到我的主文件夹。

  4. 安装脚本完成所有这些步骤后,它会设置许多符号链接和启动器脚本。我从处理刚刚手动完成的步骤的meteor-install.sh脚本中删除了所有代码行,然后运行脚本的其余部分,如下所示。(带有# ...的行表示我删除代码的位置)。

#!/bin/sh
# ...
run_it () {
# ...
RELEASE="2.3.4"
# ...
PREFIX="/usr/local"
# ...
# just double-checking :)
test -x "$HOME/.meteor/meteor"
# ...
echo
echo "Meteor ${RELEASE} has been installed in your home directory (~/.meteor)."
METEOR_SYMLINK_TARGET="$(readlink "$HOME/.meteor/meteor")"
METEOR_TOOL_DIRECTORY="$(dirname "$METEOR_SYMLINK_TARGET")"
LAUNCHER="$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor"
if cp "$LAUNCHER" "$PREFIX/bin/meteor" >/dev/null 2>&1; then
echo "Writing a launcher script to $PREFIX/bin/meteor for your convenience."
cat <<"EOF"
To get started fast:
$ meteor create ~/my_cool_app
$ cd ~/my_cool_app
$ meteor
Or see the docs at:
docs.meteor.com
Deploy and host your app with Cloud:
www.meteor.com/cloud
EOF
elif type sudo >/dev/null 2>&1; then
echo "Writing a launcher script to $PREFIX/bin/meteor for your convenience."
echo "This may prompt for your password."
# New macs (10.9+) don't ship with /usr/local, however it is still in
# the default PATH. We still install there, we just need to create the
# directory first.
# XXX this means that we can run sudo too many times. we should never
#     run it more than once if it fails the first time
if [ ! -d "$PREFIX/bin" ] ; then
sudo mkdir -m 755 "$PREFIX" || true
sudo mkdir -m 755 "$PREFIX/bin" || true
fi
if sudo cp "$LAUNCHER" "$PREFIX/bin/meteor"; then
cat <<"EOF"
To get started fast:
$ meteor create ~/my_cool_app
$ cd ~/my_cool_app
$ meteor
Or see the docs at:
docs.meteor.com
Deploy and host your app with Cloud:
www.meteor.com/cloud
EOF
else
cat <<EOF
Couldn't write the launcher script. Please either:
(1) Run the following as root:
cp "$LAUNCHER" /usr/bin/meteor
(2) Add "$HOME/.meteor" to your path, or
(3) Rerun this command to try again.
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
EOF
fi
else
cat <<EOF
Now you need to do one of the following:
(1) Add "$HOME/.meteor" to your path, or
(2) Run this command as root:
cp "$LAUNCHER" /usr/bin/meteor
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
EOF
fi

trap - EXIT
}
run_it
  1. 为了检查一切是否正常,我在终端中运行了以下命令...

    流星创建测试 ... 光盘测试 流星

。并检查默认的流星应用程序是否确实在 http://localhost:3000/运行

但这一切都无法回答这个问题:当该文件由<username>运行的进程创建时,为什么文件/home/<username>/.meteor-tarball-tmpPermission denied

相关内容

  • 没有找到相关文章

最新更新