admin管理员组文章数量:1125107
when trying to add the ppa ppa:ondrej/php on Ubuntu 24.04 server via terminal command I get a python error message.
I'm trying to add it via the command
sudo add-apt-repository ppa:ondrej/php
This is the error message:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1343, in _conn_request
conn.connect()
File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1119, in connect
address_info = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 963, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 452, in <module>
sys.exit(0 if addaptrepo.main() else 1)
^^^^^^^^^^^^^^^^^
File "/usr/bin/add-apt-repository", line 435, in main
shortcut = handler(source, **shortcut_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler
return handler(shortcut, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 89, in __init__
if self.lpppa.publish_debug_symbols:
^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 133, in lpppa
self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 120, in lpteam
self._lpteam = self.lp.people(self.teamname)
^^^^^^^
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 111, in lp
self._lp = login_func("%s.%s" % (self.__module__, self.__class__.__name__),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 494, in login_anonymously
return cls(
^^^^
File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 230, in __init__
super(Launchpad, self).__init__(
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 511, in __init__
self._wadl = self._browser.get_wadl_application(self._root_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 502, in get_wadl_application
response, content = self._request(url, media_type=wadl_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 441, in _request
response, content = self._request_and_retry(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 400, in _request_and_retry
response, content = self._connection.request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1701, in request
(response, content) = self._request(
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 144, in _request
response, content = super(LaunchpadOAuthAwareHttp, self)._request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 204, in _request
return super(RestfulHttp, self)._request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1421, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1350, in _conn_request
raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.error.ServerNotFoundError: Unable to find the server at api.launchpad
I've no idea what the problem is here and any help would be apreciated. For context, I need to install an older version of PHP to keep some old intranet pages alive. Rewriting the pages is unfortunately not an option. The server is behind a proxy, but the proxy is set in the system and apt is working fine.
Thanks in advance for the help.
本文标签: pythonError message when trying to add PPA in Ubuntu 2404 ServerStack Overflow
版权声明:本文标题:python - Error message when trying to add PPA in Ubuntu 24.04 Server - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736654506a1946219.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论