При установке репозитариев node
через кеширующих прокси сервер apt-cacher-ng
на Ubuntu 20.04 Server
для нужд сервиса rTorrent
столкнулся с невозможность обращения/получения репозитариев. Команда уходила в ошибку ниже указанную:
ekzorchik@srv-us2004b:~$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - Err:1 https://deb.nodesource.com/node_14.x focal InRelease Invalid response from proxy: HTTP/1.0 403 CONNECT denied (ask the admin to allow HTTPS tunnels) [IP: 172.35.35.16 3142] W: Failed to fetch https://deb.nodesource.com/node_14.x/dists/focal/InRelease Invalid response from proxy: HTTP/1.0 403 CONNECT denied (ask the admin to allow HTTPS tunnels) [IP: 172.35.35.16 3142] W: Some index files failed to download. They have been ignored, or old ones used instead. root@ekzorchik:~# ssh -l ekzorchik 172.35.35.16 ekzorchik@srv-cache:~$ sudo nano /etc/apt-cacher-ng/acng.conf #добавляю параметр и экранируем символ точки PassThroughPattern: deb\.nodesource\.com:443$ # или можно разрешить все ресурсы # Or you can simply allow CONNECT for every https host: # PassThroughPattern: .* ekzorchik@srv-cache:~$ sudo systemctl restart apt-cacher-ng && sudo systemctl status apt-cacher-ng | head -n5 ● apt-cacher-ng.service - Apt-Cacher NG software download proxy Loaded: loaded (/lib/systemd/system/apt-cacher-ng.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2022-04-20 13:14:48 MSK; 17ms ago Main PID: 12091 (apt-cacher-ng) Tasks: 1 (limit: 2314) ekzorchik@srv-cache:~$
А после возвращаюсь к системе где устанавливаю репозитарии node
и все успешно проходит:
ekzorchik@srv-us2004b:~$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - ## Installing the NodeSource Node.js 14.x repo... ## Populating apt-get cache... + apt-get update Get:1 https://deb.nodesource.com/node_14.x focal InRelease [4,583 B] Get:2 https://deb.nodesource.com/node_14.x focal/main amd64 Packages [775 B] Hit:3 http://ru.archive.ubuntu.com/ubuntu focal InRelease Hit:4 http://ru.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:5 http://ru.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:6 http://ru.archive.ubuntu.com/ubuntu focal-security InRelease Fetched 5,358 B in 2s (3,227 B/s) Reading package lists... Done ## Confirming "focal" is supported... + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_14.x/dists/focal/Release' ## Adding the NodeSource signing key to your keyring... + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null ## Creating apt sources list file for the NodeSource Node.js 14.x repo... + echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x focal main' > /etc/apt/sources.list.d/nodesource.list + echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x focal main' >> /etc/apt/sources.list.d/nodesource.list ## Running `apt-get update` for you... + apt-get update Hit:1 https://deb.nodesource.com/node_14.x focal InRelease Hit:2 http://ru.archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://ru.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://ru.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:5 http://ru.archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done ## Run `sudo apt-get install -y nodejs` to install Node.js 14.x and npm ## You may also need development tools to build native addons: sudo apt-get install gcc g++ make ## To install the Yarn package manager, run: curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn ekzorchik@srv-us2004b:~$
И еще один нюанс устранения в мою копилку наработок.
На этом задача все, с уважением автор блога Олло Александр aka ekzorchik.