镜像下载、域名解析、时间同步请点击 阿里云开源镜像站
ubuntu版本:20.04 ADE:4.4.0
Autoware.auto版本(基于ROS2):autoware.auto foxy, ros foxy
以下操作,请确定自己已经换源了,不然下载很慢的,参考Ubuntu20.04软件源更换 - 知乎
Ubuntu系统中,软件源文件地址为:/etc/apt/sources.list
1.备份原来的源,将以前的源备份一下,以防以后可以用的。
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.打开/etc/apt/sources.list文件,在前面添加如下条目,并保存。
$ sudo vim /etc/apt/sources.list(可将vim更换为自己熟悉的编辑器)
添加阿里源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
3.更新
更新源
$ sudo apt-get update
如出现依赖问题,解决方式如下:
$ sudo apt-get -f install
更新软件:
$ sudo apt-get upgrade
官方安装教程:Install Docker Engine on Ubuntu | Docker Documentation
// 卸载旧版本docker
#Uninstall old versions
$ sudo apt-get remove docker docker-engine docker.io containerd runc
#Uninstall Docker Engine
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io
$ sudo rm -rf /var/lib/docker
$ sudo rm -rf /var/lib/containerd
// 使用docker repository安装docker engine
#step1:在新主机上首次安装Docker Engine之前,需要设置Docker存储库。之后,您可以从存储库安装和更新Docker
#更新apt软件包索引并安装软件包,以允许apt通过HTTPS使用存储库
$ sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
#Step2:Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
#Step3:Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#Step4:Install Docker Engine
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io //如果没有指定版本,默认安装最高版本
#Step5:Verify that Docker Engine is installed correctly by running the hello-world image.
$ sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
Manage Docker as a non-root user
# 创建docker用户组
$ sudo groupadd docker
#将当前用户加入docker用户组
$ sudo usermod -aG docker $USER
#Log out and log back in so that your group membership is re-evaluated.
$ newgrp docker
#Verify that you can run docker commands without sudo.
$ docker run hello-world
$ sudo chmod 666 /var/run/docker.sock
#重启电脑或者重启docker服务
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
$ sudo docker login registry.gitlab.com # Use token from Gitlab
基于Docker封装的开发容器,包含以下内容:

ADE 是模块化的 Docker-based 工具,它确保所有的开发者构建项目时有一个共同的、一致的开发环境
官网安装文档:Installation — ADE 4.4.0dev documentation
#install it in “/usr/local/bin” PATH
$ cd /usr/local/bin
$ sudo wget https://gitlab.com/ApexAI/ade-cli/-/jobs/1859684348/artifacts/raw/dist/ade+x86_64
$ sudo mv ade+x86_64 ade
$ sudo chmod +x ade
$ which ade
/path/to/ade
# 查看ade版本号
$ ade --version
<version>
# Update ade
$ sudo ./ade update-cli #这个地方需要一段时间
Newer version available:
4.4.0
4.3.0
4.2.0
Do you want to update to version 4.4.0 [y/N]: y
<!-- '注意:升级ade版本可能会报错 “PermissionError: [Errno 13] Permission denied: '/usr/local/bin/ade'”,切换root用户再次执行,问题解决'->
官网安装文档:Installation with ADE
$ mkdir -p ~/adehome
$ cd ~/adehome
$ touch .adehome
$ git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
'注意:不要使用官网视频课程里面的递归循环安装,编译会报错'
'git clone --recurse-submodules https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git'
$ cd AutowareAuto
#拉取一些其他分支到master
$ vcs import < autoware.auto.$ROS_DISTRO.repos
#切换到发布分支,如果不切换,默认使用master 分支代码,可能包含一些正在开发的功能,建议切换稳定发布版本
$ git checkout tags/1.0.0 -b release-1.0.0
#共享环境变量
$ cd ~
$ mv ~/.bashrc ~/adehome/.bashrc
$ ln -s ~/adehome/.bashrc
$ cd ~/adehome/AutowareAuto
#其实,有很多预先配置好的ADE环境供我们选择,官网提供了三个ADE配置文件:AMD64/ARM64/AMD64+LGSVL
$ ls -l .aderc*
lrwxrwxrwx 1 wtcl wtcl 17 12月 23 12:14 .aderc -> .aderc-amd64-foxy
-rw-rw-r-- 1 wtcl wtcl 407 12月 23 12:25 .aderc-amd64-dashing
-rw-rw-r-- 1 wtcl wtcl 499 12月 23 12:25 .aderc-amd64-dashing-lgsvl
-rw-rw-r-- 1 wtcl wtcl 401 12月 23 12:25 .aderc-amd64-foxy
-rw-rw-r-- 1 wtcl wtcl 490 12月 23 12:25 .aderc-amd64-foxy-lgsvl
lrwxrwxrwx 1 wtcl wtcl 17 12月 23 12:14 .aderc-arm64 -> .aderc-arm64-foxy
-rw-rw-r-- 1 wtcl wtcl 407 12月 23 12:25 .aderc-arm64-dashing
-rw-rw-r-- 1 wtcl wtcl 401 12月 23 12:25 .aderc-arm64-foxy
lrwxrwxrwx 1 wtcl wtcl 23 12月 23 12:14 .aderc-lgsvl -> .aderc-amd64-foxy-lgsvl
#可以看到有好几种可选的环境,其中.aderc-lgsvl对应的环境中包含LGSVL模拟器。然后,可以通过如下命令,切换并进入相应的ADE环境:
#二选一安装,这个地方安装有点慢,需要等待一会,ade --rc 命令可以加载并启动相关的镜像容器
$ ade --rc .aderc-amd64-foxy start --update --enter
<!-- '注意:启动ade报错
“Starting ade with the following images:
ade-foxy | ec7293d289ad | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/ade-foxy:master
binary-foxy | 9ffc6c658b7a | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/binary-foxy:master
ade_registry.gitlab.com_autowarefoundation_autoware.auto_autowareauto_amd64_binary-foxy_master
xhost: unable to open display "localhost:10.0"
WARNING: Could not find xhost, you won't be able to launch X applications"
解决办法:设置本地显示命令-- $ export DISPLAY=localhost:10.0 $ xhost +>
#What is where inside ADE?
ade$ls /opt
AutowareAuto # image: binary-foxy:master
lgsvl # image: ade-lgsvl/foxy:2020.06
ros # image: ade-foxy:master
ade安装过程中可能需要访问gitlab的令牌,需要登录gitlab申请
In one terminal, source the setup file and then run a C++ talker:
ade$ ade enter
ade$ source ~/AutowareAuto/install/setup.bash
ade$ ros2 run demo_nodes_cpp talker
In another terminal source the setup file and then run a Python listener:
ade$ cd ~/AutowareAuto
ade$ source ~/AutowareAuto/install/setup.bash
ade$ ros2 run demo_nodes_py listener
You should see the talker saying that it’s Publishing messages and the listener saying I heard those messages. This verifies both the C++ and Python APIs are working properly. Hooray!
#docker容器 清理无用镜像,卷
$ cd ~/adehome/AutowareAuto
$ ade start
#To assess the disk usage situation, run the following command:
$ docker system df
#Use docker system prune to remove any Docker items not used for currently running containers:
$ docker system prune -a --volumes
#Restart your system after installing the new NVIDIA driver.
ade$ exit
$ ade stop
$ ade start --update --enter
安装完成后运行
ade $ros2 run demo_nodes_cpp talker 不工作,没办法,继续使用源码进行编译安装
issue回复:colcon build failed on trajectory.hpp file not found (#67) · Issues · ApexAI / AutowareClass2020 · GitLab
Autoware.auto官网安装文档:Installation w/o ADE
ROS2官网安装文档:Building ROS 2 on Ubuntu Linux — ROS 2 Documentation: Foxy documentation
#如果安装了旧版本,先卸载
$ sudo apt-get purge ros-foxy*
$ sudo rm -rf /etc/ros
$ sudo gedit ~/.bashrc
删除那个东西bash
$ source ~/.bashrc
#安装编译工具包
#Apt packages
$ sudo apt install -y git cmake python3-pip
#Python modules
$ pip3 install -U colcon-common-extensions vcstool
#First, the ROS 2 core components and tools must be installed
#安装ROS2核心包
#设置语言环境,确保语言环境支持UTF-8
$ locale # check for UTF-8
#只检查是否有可用更新,给出汇总报告和提示信息
$ sudo apt update
#查看可升级的软件的全部版本信息
$ sudo apt list --upgradable -a
$ sudo apt install locales
$ sudo locale-gen en_US en_US.UTF-8
$ sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
$ export LANG=en_US.UTF-8
$ locale # verify settings
#确保ros2仓库可用
$ apt-cache policy | grep universe
#如果不可用,执行下面命令
$ sudo apt install software-properties-common
$ sudo add-apt-repository universe
#需要在系统中添加ROS 2 apt存储库。为此,请首先使用如下所示的apt授权GPG密钥:
#Now add the ROS 2 apt repository to your system. First authorize our GPG key with apt.
$ sudo apt update
$ sudo apt install curl gnupg lsb-release
$ sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
#然后将存储库添加到源列表中
#Then add the repository to your sources list.
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
#Install development tools and ROS tools
sudo apt update && sudo apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-flake8 \
python3-pip \
python3-pytest-cov \
python3-rosdep \
python3-setuptools \
python3-vcstool \
wget
# install some pip packages needed for testing
python3 -m pip install -U \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat \
pytest-rerunfailures \
pytest
# install Fast-RTPS dependencies
sudo apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev
# install Cyclone DDS dependencies
sudo apt install --no-install-recommends -y \
libcunit1-dev
# Get ROS 2 code
# ROS2源码下载,Install ROS 2 packages
$ mkdir -p ~/ros2_foxy/src
$ cd ~/ros2_foxy
$ wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos
$ vcs import src < ros2.repos
#Install dependencies using rosdep
$ sudo apt update
$ sudo rm -rf /etc/ros/rosdep/sources.list.d/20-default.list
$ sudo rosdep init
$ rosdep update
$ rosdep install --from-paths src --reinstall --ignore-src -y --rosdistro=foxy --skip-keys "fastcdr rti-connext-dds-5.3.1 urdfdom_headers"
$ rosdep check --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-5.3.1 urdfdom_headers"
'Note: If you’re using a distribution that is based on Ubuntu (like Linux Mint) but does not identify itself as such, you’ll get an error message like Unsupported OS [mint]. In this case append --os=ubuntu:focal to the above command.'
#rti-dds可以单独安装
#https://docs.ros.org/en/foxy/Installation/DDS-Implementations.html
#工作空间编译源码安装
#检查ROS环境变量,确保没有使用“source /opt/ros/${ROS_DISTRO}/setup.bash”设置过环境变量
$ printenv | grep -i ROS #如果显示空,后面编译会有问题
PWD=/pathto/ros2_foxy
$ cd ~/ros2_foxy/
$ colcon build --symlink-install
$ colcon test
$ colcon test-result --verbose
#Demo test,In one terminal, source the setup file and then run a C++ talker:
$ source ~/ros2_foxy/install/setup.bash
$ ros2 run demo_nodes_cpp talker
#In another terminal source the setup file and then run a Python listener:
$ source ~/ros2_foxy/install/setup.bash
$ ros2 run demo_nodes_py listener
=================================================以上是ROS2 源码安装,下面是安装Autoware.auto源码安装 =============================
$ export ROS_DISTRO = foxy
$ echo $ROS_DISTRO
#ROS2安装完成后, 设置环境变量
$ source ~/ros2_foxy/install/setup.bash
#将ROS环境变量添加到bashrc文件里面
$ echo "source ~/ros2_foxy/install/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
# Autoware.Auto project requires some ROS 2 packages in addition to the core components. The tool rosdep allows an automatic search and installation of such dependencies.
$ sudo apt update
$ sudo apt install -y python3-rosdep
$ sudo rosdep init
$ rosdep update
#安装Autoware.Auto依赖的ROS2的其它包,rosdep会自动搜索安装
$ mkdir -p ~/adehome
$ cd ~/adehome
$ touch .adehome
$ git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
$ cd AutowareAuto
$ vcs import < autoware.auto.$ROS_DISTRO.repos
$ export ROS_VERSION=2
#rosdep 一次安装src下所有依赖
$ rosdep install --reinstall -y -i --from-paths src
// 这一步可有可不有。
//目的是切换想要安装的autoware版本,如果不切换master将使用最新分支
#Checkout the latest release by checking out the corresponding tag or release branch.
$ git checkout tags/1.0.0 -b release-1.0.0
# If running tests or demos, also pull binary files with
$ git lfs pull --exclude="" --include="*"
#共享环境变量
$ cd ~
$ mv ~/.bashrc ~/adehome/.bashrc
$ ln -s ~/adehome/.bashrc
#打开一个干净的ade容器进行编译
$ ade stop
$ sudo ade update-cli
$ ade --rc .aderc-amd64-foxy-lgsvl start --update --enter
ade$ cd AutowareAuto
ade$ rm -rf build/ install/ log/
#To build all packages in Autoware.Auto, navigate into the AutowareAuto directory and run
ade$ colcon build
ade$ colcon test
ade$ colcon test-result --verbose
上述步骤中,第二步命令可以拉取一些其他分支到master,补充一些文件。我开始没有执行这个命令,
导致在执行colcon build,出现无法找到文件
autoware_auto_msgs/msg/trajectory.hpp的错误。
如果colcon 不起作用,配置colcon 环境变量
Take the defaults file that comes with the Autoware.Auto source checkout and add it to your shell startup;
echo COLCON_DEFAULTS_FILE
$ echo "export COLCON_DEFAULTS_FILE=/path/to/AutowareAuto/tools/ade_image/colcon-defaults.yaml" >> .bashrc
或者手工导入
$ export COLCON_DEFAULTS_FILE=/path/to/AutowareAuto/tools/ade_image/colcon-defaults.yaml
编译完一定要source:
$ source /opt/AutowareAuto/setup.bash
或
$ source ~/AutowareAuto/install/setup.bash
我们可能遇到的很多问题都是由于代码版本、旧的编译文件存在等导致,所以需要更新ade和docker容器,以及清理一些旧的build等文件,可以通过以下操作完成:
$ ade stop
$ sudo ade update-cli
$ ade start --update --enter
ade$ cd AutowareAuto
ade$ rm -rf build/ install/ log/ src/external/
ade$ git pull
ade$ vcs import < autoware.auto.$ROS_DISTRO.repos
~/adehome/AutowareAuto 中;
$ ade start
$ ade enter
ade$ ls /opt
ade$ exit
$ ade stop
#查找所有已安装的软件包
$dpkg -l——查看所有已安装的软件包
#清除所以删除包的残余配置文件
$dpkg -l |grep ^rc|awk ‘{print $2}’ |tr [”"n”] [” “]|sudo xargs dpkg -P -
#查看需卸载的软件包
$dpkg -l |grep 软件名
#clean 命令删除所有的软件安装包。
$ sudo apt-get clean
#autoclean 命令删除不再可用的软件安装包。
$ sudo apt-get autoclean
#remove 命令移除 以及任何依赖这个包的其它包
$sudo apt-get remove 软件名
#用purge 命令清除式卸载
$apt-get purge <pakage_name>
#autoremove 命令删除不再需要的依赖软件包。
$ sudo apt-get autoremove
#install 命令下载软件包,以及所有依赖的包,同时进行包的安装或升级
$ apt-get install 软件名
#libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.4 is to be installed
$ sudo apt install libc6=2.31-0ubuntu9.2 libc-bin=2.31-0ubuntu9.2
#reinstall 命令重新安装软件包。
$ apt-get --reinstall install softname1
#升级来自 Debian 镜像的包列表,如果你想安装当天的任何软件,至少每天运行一次,而且每次修改了
$ sudo apt-get update
#升级所有已经安装的包为最新可用版本。不会安装新的或移除老的包。建议同时使用 '-u' 选项,因为这样你就能看到哪些包将会被升级
$ apt-get upgrade -u
#apt-get upgrade 类似,除了 dist-upgrade 会安装和移除包来满足依赖关系。因此具有一定的危险性
$ apt-get dist-upgrade -u
#在软件包名称和描述中,搜索包含xxx的软件包
$ apt-cache search
#显示某个软件包的完整的描述
$apt-cache show
#Dpkg方式安装软件源
$ dpkg -i package_name.deb
#移除式卸载:
$dpkg -r pkg1 pkg2 ...
#清除式卸载:
$dpkg -P pkg1 pkg2..
#将删除相关软件,同时删除该软件的配置文件
$ dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -p
#重新安装已安装的包
$ dpkg -l | grep ^ii | awk '{print $2}' | xargs sudo apt-get reinstall
1. 代码及录制视频下载
代码下载
$ cd ~/adehome/AutowareAuto/
$ ade start
$ ade enter
$ git clone https://gitee.com/knowmefly/camera-hands-on-ws.git
视频下载:https://download.csdn.net/download/jiluonian/22771297 下载 laneVideo.h264 视频文件放置在 ~/adehome/camera-hands-on-ws/src/lane_detection_data_loader/resources/ 目录下
2. 编译安装
$ ade enter
$ cd camera-hands-on-ws/
$ rm -rf build/ install/ log/
$ colcon build
'可能找不到opencv,安装opencv库'
$sudo apt install libopencv-dev python3-opencv
3.运行视频加载、图像处理、可视化节点
# terminal 1
$ ade enter
$ cd camera-hands-on-ws/
$ source install/setup.bash
$ ros2 run lane_detection_data_loader lane_detection_data_loader_node
# terminal 2
$ ade enter
$ cd camera-hands-on-ws/
$ source install/setup.bash
$ ros2 run lane_detection_projection lane_detection_projection_node
# terminal 3
$ ade enter
$ cd camera-hands-on-ws/
$ source install/setup.bash
$ ros2 run lane_detection_visualization lane_detection_visualization_node
# terminal 4
$ ade enter
$ export QT_DEBUG_PLUGINS=1
$ export DISPLAY=:0.0
$ rviz2
'qt.qpa.xcb: could not connect to display localhost:10.0
'qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
'This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
'Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
'Aborted (core dumped)''
解决办法:
加载插件跟踪
$ export QT_DEBUG_PLUGINS=1
$ export DISPLAY=:0.0
在vi /etc/profile内添加export DISPLAY=xserverip:0.0 执行source /etc/profile 第二步:然后ssh终端安装xorg并使用xclock测试能否回传图像:
apt-get install xorg
xclock
执行后桌面会跳出一个时钟的图案

本文转自:https://blog.csdn.net/baiyefenglin/article/details/122921360
我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po
我打算为ruby脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
由于fast-stemmer的问题,我很难安装我想要的任何rubygem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=
这里有一个很好的答案解释了如何在Ruby中下载文件而不将其加载到内存中:https://stackoverflow.com/a/29743394/4852737require'open-uri'download=open('http://example.com/image.png')IO.copy_stream(download,'~/image.png')我如何验证下载文件的IO.copy_stream调用是否真的成功——这意味着下载的文件与我打算下载的文件完全相同,而不是下载一半的损坏文件?documentation说IO.copy_stream返回它复制的字节数,但是当我还没有下
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub