无法安装/运行 cloudflared

无法安装/运行 cloudflared

我今天一直在设置 Pi-hole,并想使用 Cloudflared 进行 DNS-over-HTTPS。我尝试了几个不同的教程,但总是在使用上遇到困难cloudflared --version

pi@pi-hole:~ $ ls
cloudflared-stable-linux-amd64.deb  Desktop  Documents  Downloads  MagPi  Music  Pictures  Public  Templates  Videos
pi@pi-hole:~ $ sudo apt-get install ./cloudflared-stable-linux-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'cloudflared:amd64' instead of './cloudflared-stable-linux-amd64.deb'
cloudflared:amd64 is already the newest version (2019.10.4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@pi-hole:~ $ sudo cloudflared --version
sudo: unable to execute /usr/local/bin/cloudflared: No such file or directory
pi@pi-hole:~ $ cd /
pi@pi-hole:/ $ cd usr/local/bin
pi@pi-hole:/usr/local/bin $ ls -l
total 38216
-rwxr-xr-x 1 root root 39114256 Oct 21 15:00 cloudflared
-rwxr-xr-x 1 root root    14655 Oct 23 09:27 pihole

我在 Xenserver 虚拟机中运行 Raspberry Pi Desktop。

pi@pi-hole:/usr/local/bin $ uname -m
x86_64
pi@pi-hole:/usr/local/bin $ file cloudflared
cloudflared: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, Go BuildID=YvLL9ax0IXHPa3ehgMdM/cni8ZTgd4Q12MDeKtPvI/3MjRiWDil4zJKPjW8Bhe/XMFlqqYnI277kgIRSLdT, BuildID[sha1]=23942fcd1bb134ccd737c1ff188006eb3d0a4a6a, not stripped
pi@pi-hole:/usr/local/bin $

据我所知,我的操作系统有正确的可执行文件。有什么建议吗?

我已查看了这些教程以供参考:

编辑 11/11/19 我尝试了 systemd 脚本。这是我尝试启动服务时收到的错误:

pi@pi-hole:~ $ sudo systemctl start cloudflared
Job for cloudflared.service failed because of unavailable resources or another system error.
See "systemctl status cloudflared.service" and "journalctl -xe" for details.
pi@pi-hole:~ $ sudo systemctl status cloudflared.service
● cloudflared.service - cloudflared DNS over HTTPS proxy
   Loaded: loaded (/etc/systemd/system/cloudflared.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: resources) since Mon 2019-11-11 18:28:51 CST; 3s ago

Nov 11 18:28:51 pi-hole systemd[1]: cloudflared.service: Service RestartSec=10s expired, scheduling restart.
Nov 11 18:28:51 pi-hole systemd[1]: cloudflared.service: Scheduled restart job, restart counter is at 9.
Nov 11 18:28:51 pi-hole systemd[1]: Stopped cloudflared DNS over HTTPS proxy.
Nov 11 18:28:51 pi-hole systemd[1]: cloudflared.service: Failed to load environment files: No such file or directory
Nov 11 18:28:51 pi-hole systemd[1]: cloudflared.service: Failed to run 'start' task: No such file or directory
Nov 11 18:28:51 pi-hole systemd[1]: cloudflared.service: Failed with result 'resources'.
Nov 11 18:28:51 pi-hole systemd[1]: Failed to start cloudflared DNS over HTTPS proxy.

似乎源于我在尝试运行 cloudflared 时看到的相同错误,它说没有这样的文件或目录。

相关内容