问题描述:New ROS Distro index url: 'https://raw.githubusercontent.com/ros/rosdistro/f2392c54afcfa19910ceabaa54485479e377cfd6/index-v4.yaml
ROS Distro index file associate with commit 'f2392c54afcfa19910ceabaa54485479e377cfd6'
New ROS Distro index url: 'https://raw.githubusercontent.com/ros/rosdistro/f2392c54afcfa19910ceabaa54485479e377cfd6/index-v4.yaml'
Traceback (most recent call last):
File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/usr/lib/python3.8/http/client.py", line 1418, in connect
super().connect()
File "/usr/lib/python3.8/http/client.py", line 922, in connect
self.sock = self._create_connection(
File "/usr/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/usr/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/rosdistro/loader.py", line 48, in load_url
fh = urlopen(url, timeout=timeout)
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1397, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/bloom-generate", line 11, in <module>
load_entry_point('bloom==0.11.2', 'console_scripts', 'bloom-generate')()
File "/usr/lib/python3/dist-packages/bloom/commands/generate.py", line 82, in main
create_subparsers(parser, generator_cmds)
File "/usr/lib/python3/dist-packages/bloom/commands/generate.py", line 68, in create_subparsers
desc = load_generator_description(generator_cmd)
File "/usr/lib/python3/dist-packages/bloom/commands/generate.py", line 56, in load_generator_description
return entry_point.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/bloom/generators/debian/__init__.py", line 1, in <module>
from .generator import DebianGenerator
File "/usr/lib/python3/dist-packages/bloom/generators/debian/generator.py", line 84, in <module>
from bloom.packages import get_package_data
File "/usr/lib/python3/dist-packages/bloom/packages.py", line 46, in <module>
from bloom.config import BLOOM_CONFIG_BRANCH
File "/usr/lib/python3/dist-packages/bloom/config.py", line 122, in <module>
get_non_eol_distros_prompt()
File "/usr/lib/python3/dist-packages/bloom/rosdistro_api.py", line 191, in get_non_eol_distros_prompt
rosdistro_index = get_index()
File "/usr/lib/python3/dist-packages/bloom/rosdistro_api.py", line 121, in get_index
_rosdistro_index = rosdistro.get_index(get_index_url())
File "/usr/lib/python3/dist-packages/rosdistro/__init__.py", line 104, in get_index
yaml_str = load_url(url)
File "/usr/lib/python3/dist-packages/rosdistro/loader.py", line 59, in load_url
raise URLError(str(e) + ' (%s)' % url)
urllib.error.URLError: <urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/f2392c54afcfa19910ceabaa54485479e377cfd6/index-v4.yaml)>
原因分析:
联网问题,其访问https://raw.githubusercontent.com/ros/rosdistro/f2392c54afcfa19910ceabaa54485479e377cfd6/index-v4.yaml,访问不到。
解决方案:
打开/usr/lib/python3/dist-packages/rosdistro目录下的__init__.py
将DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml’注释,并且添加DEFAULT_INDEX_URL = ‘file:///etc/ros/rosdistro/master/index-v4.yaml’。
在etc/ros/rosdistro/master文件夹下创建index-v4.yaml文件,内容是:
%YAML 1.1
ROS index file
see REP 153: http://ros.org/reps/rep-0153.html
— distributions: ardent:
distribution: [ardent/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/ardent-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros2
python_version: 3 bouncy:
distribution: [bouncy/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/bouncy-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros2
python_version: 3 crystal:
distribution: [crystal/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/crystal-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros2
python_version: 3 dashing:
distribution: [dashing/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/dashing-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros2
python_version: 3 eloquent:
distribution: [eloquent/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/eloquent-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros2
python_version: 3 foxy:
distribution: [foxy/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/foxy-cache.yaml.gz
distribution_status: active
distribution_type: ros2
python_version: 3 galactic:
distribution: [galactic/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/galactic-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros2
python_version: 3 groovy:
distribution: [groovy/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/groovy-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros1
python_version: 2 humble:
distribution: [humble/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/humble-cache.yaml.gz
distribution_status: active
distribution_type: ros2
python_version: 3 hydro:
distribution: [hydro/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/hydro-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros1
python_version: 2 indigo:
distribution: [indigo/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/indigo-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros1
python_version: 2 jade:
distribution: [jade/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/jade-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros1
python_version: 2 kinetic:
distribution: [kinetic/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/kinetic-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros1
python_version: 2 lunar:
distribution: [lunar/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/lunar-cache.yaml.gz
distribution_status: end-of-life
distribution_type: ros1
python_version: 2 melodic:
distribution: [melodic/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/melodic-cache.yaml.gz
distribution_status: active
distribution_type: ros1
python_version: 2 noetic:
distribution: [noetic/distribution.yaml]
distribution_cache: http://repositories.ros.org/rosdistro_cache/noetic-cache.yaml.gz
distribution_status: active
distribution_type: ros1
python_version: 3 rolling:
distribution: [rolling/distribution.yaml]
distribution_cache: http://repo.ros2.org/rosdistro_cache/rolling-cache.yaml.gz
distribution_status: rolling
distribution_type: ros2
python_version: 3 type: index version: 4