获取安装脚本

获取安装脚本

我已按照 surfshark 页面上的所有说明操作,但它无法安装在我的电脑上。我在命令提示符中不断收到此消息。我是 Ubuntu 新手。

akash@akash-Aspire-TC-280:~$ sudo apt install curl
https://downloads.surfshark.com/linux/debian-install.sh 
[sudo] password for akash: 
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
bash: https://downloads.surfshark.com/linux/debian-install.sh: No such file or directory
akash@akash-Aspire-TC-280:~$ sudo dpkg --configure -a
Setting up libaom3:amd64 (3.3.0-1) ...
Setting up libmng2:amd64 (2.0.3+dfsg-3) ...
Setting up libdouble-conversion3:amd64 (3.1.7-4) ...
Setting up libxcb-xinput0:amd64 (1.14-3ubuntu3) ...
Setting up libigdgmm12:amd64 (22.1.2+ds1-1) ...
Setting up fonts-open-sans (1.11-2) ...
Setting up libpcre2-16-0:amd64 (10.39-3ubuntu0.1) ...
Setting up libxcb-xinerama0:amd64 (1.14-3ubuntu3) ...
Setting up libva2:amd64 (2.14.0-1) ...
Setting up intel-media-va-driver:amd64 (22.3.1+dfsg1-1ubuntu1) ...
Setting up libaacs0:amd64 (0.11.1-1) ...
Setting up libqt5core5a:amd64 (5.15.3+dfsg-2ubuntu0.2) ...
Setting up libva-drm2:amd64 (2.14.0-1) ...
Setting up ocl-icd-libopencl1:amd64 (2.2.14-3) ...
Setting up libvdpau1:amd64 (1.4-3build2) ...
Setting up libqt5dbus5:amd64 (5.15.3+dfsg-2ubuntu0.2) ...
Setting up libmd4c0:amd64 (0.4.8-1) ...
Setting up libmfx1:amd64 (22.3.0-1) ...
Setting up libva-x11-2:amd64 (2.14.0-1) ...
Setting up kwayland-data (4:5.92.0-0ubuntu1) ...
Setting up libqt5network5:amd64 (5.15.3+dfsg-2ubuntu0.2) ...
Setting up libavutil56:amd64 (7:4.4.2-0ubuntu0.22.04.1) ...
Setting up libqt5gui5:amd64 (5.15.3+dfsg-2ubuntu0.2) ...
Setting up libqt5widgets5:amd64 (5.15.3+dfsg-2ubuntu0.2) ...
Setting up qt5-image-formats-plugins:amd64 (5.15.3-1) ...
Setting up libqt5svg5:amd64 (5.15.3-1) ...
Processing triggers for fontconfig (2.13.1-4.2ubuntu5) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
akash@akash-Aspire-TC-280:~$ sudo apt install curl
https://downloads.surfshark.com/linux/debian-install.sh 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-open-sans intel-media-va-driver kwayland-data libaacs0 libaom3 libavutil56 libcodec2-1.0 libdouble-conversion3 libigdgmm12 libmd4c0 libmfx1 libmng2
  libpcre2-16-0 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libva-drm2 libva-x11-2 libva2 libvdpau1 libxcb-xinerama0 libxcb-xinput0
  qt5-image-formats-plugins systemd-hwe-hwdb
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libcodec2-1.0 libcurl4
The following NEW packages will be installed
  curl
The following packages will be upgraded:
  libcodec2-1.0 libcurl4
2 to upgrade, 1 to newly install, 0 to remove and 278 not to upgrade.
1 not fully installed or removed.
Need to get 193 kB/8,918 kB of archives.
After this operation, 15.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 curl amd64 7.81.0-1ubuntu1.7 [193 kB]
Fetched 193 kB in 0s (2,469 kB/s)
(Reading database ... 198418 files and directories currently installed.)
Preparing to unpack .../libcodec2-1.0_1.0.1-3_amd64.deb ...
Unpacking libcodec2-1.0:amd64 (1.0.1-3) over (1.0.1-3) ...
Preparing to unpack .../libcurl4_7.81.0-1ubuntu1.7_amd64.deb ...
Unpacking libcurl4:amd64 (7.81.0-1ubuntu1.7) over (7.81.0-1ubuntu1.3) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.81.0-1ubuntu1.7_amd64.deb ...
Unpacking curl (7.81.0-1ubuntu1.7) ...
Setting up libcodec2-1.0:amd64 (1.0.1-3) ...
Setting up libcurl4:amd64 (7.81.0-1ubuntu1.7) ...
Setting up curl (7.81.0-1ubuntu1.7) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
bash: https://downloads.surfshark.com/linux/debian-install.sh: No such file or directory
akash@akash-Aspire-TC-280:~$ cat surfshark-install.sh 
cat: surfshark-install.sh: No such file or directory
akash@akash-Aspire-TC-280:~$ sh surfshark-install.sh 
sh: 0: cannot open surfshark-install.sh: No such file
akash@akash-Aspire-TC-280:~$ curl -f https://downloads.surfshark.com/linux/debian-install.sh 
#!/bin/sh
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
_ARCHS=$(dpkg --print-architecture && dpkg --print-foreign-architectures)

if ! echo "$_ARCHS" | grep amd64 1>/dev/null 2>/dev/null; then
    echo "Unsupported architecture. $( echo "$_ARCHS" | tr '\n' ' ')"
    exit 1
fi

SUDO="sudo"
if [ "$(id -u)" = "0" ]; then
    SUDO=
fi
sudo -k

echo "This script requires superuser access to install apt package."

set -ex

$SUDO apt-get remove -y surfshark surfshark-release || true

$SUDO tee /etc/apt/trusted.gpg.d/surfshark.asc << PGP_KEY
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBFxSwz0BDACoAGeNYqWGXVsHsgLCBxrEb/6n7quYf1Yu3c5rqvWshEzsCf/i
zr5z+3Yiomf515H1cQDbvz+aHzaMG4iM5rBUowZ+3E3dLr7jO1SQ9Q1olnV5vvb4
Jclp0qzNmaFrZ643wqNIzWM13RVbb88meU2Q9DzraF8OJlkS54gz/SlJlA5kUsWs
6a2zapid/EAoxZIhMaV265ycLwwA/Sh8ilrbjaTabH9xCvUywef/PDqDflzIhCYe
cS0gQFeNZe/HQp/RPwUgfqkAPhabM5xvWSYu9CvrZCIy0FlCW5ivbazZMm26fIV2
wLvczOW08e2oUCCfUSzQLqAMNIopex1bHWcXou7GvHOkgH9GltgUxId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5mtmWSl5lGLgP1lQwgWZZEbFqyFGDuvF28eLrqr+
vnihrf1XusQMfccBhhT+beDM1PFoSXaywrK7uYssDTQYCLtF3tNHQprMQ6Tvq90N
X+JPPpk+v2CIgaRjpWDqV1lifkIqODDjIIsCKQzESaPYRMYJkIsMSJGGTLO+ZgkC
7G2o6CioSLycj5WeyAPSpgkG6mCzaIxeSBWwl2tMLBOStbzSdyWJMbix+Bo0RTGg
v8B3qZPF6RzBxfOpWmHnCmQOuj41prOVJZ/+Z6jse7urzY7AqGt5nhvApBSzQTqG
lcmxPL/yxvG/6H8yAjEeiTD821EsyQARAQABiQG8BBgBCgAmAhsMFiEE0A/cMiEj
MhUnH4jcHbdZDoPI9kMFAmPaV8cFCQtJ+4oACgkQHbdZDoPI9kNTmgv9HQcl1IBI
0557KRyc1IyoItl1DG4n1jQzUauMZNJqjp7HOAKsttI8LhPVxWNKBT6IPcNssPXX
Xfg8aMMRd+inHc/ovWJu7I84deTGRf453ZnLfxOFC1L50z4mmQ2Urk5ToHfu2KIp
QGplEQnoaYpAX79mz4bdXO173IQHds14HGvH9+Az2HCi43GY0eo3xNv3MayU+Lc4
ol61gtR3WX0D4hM/HzDeCjF5q9bCGc+8oV0XZPQOetQ+5o7KtpnewUjZXcCr0vMh
mceP8qXWhrUtd4pUexw3ChKTbBbu6oOejmeMiCpiCj6VkhUO/JO037kbs48mmms9
Sw8hAz7AmVBxcnL5JmTLt38CNjdecRJUUxf48tG1lFAfEDo3FCG0sKyk2D4vNjOc
RkJcwHjawM1f9XzogikFoU3WgKujIsz5UgdTVONOxacWqQVRgzDRJR3ECBVaGuJ7
qj4kZ6DWDfj/SONmBvxaerlwnU/NNQdBOWLbmAU/UFD37faH8rUqlWv4
=bVHI
-----END PGP PUBLIC KEY BLOCK-----
PGP_KEY
echo "deb https://ocean.surfshark.com/debian stretch main" | $SUDO tee /etc/apt/sources.list.d/surfshark.list
$SUDO apt-get update
$SUDO apt-get install -y surfshark

set +x

echo ""
echo "Surfshark was successfully installed."
echo ""
### END OF SCRIPTakash@akash-Aspire-TC-280:~$ cat surfshark-install.sh 
cat: surfshark-install.sh: No such file or directory
akash@akash-Aspire-TC-280:~$ sh surfshark-install.sh 
sh: 0: cannot open surfshark-install.sh: No such file
akash@akash-Aspire-TC-280:~$ cat surfshark-install.sh 
cat: surfshark-install.sh: No such file or directory
akash@akash-Aspire-TC-280:~$ 

答案1

注意:我不使用 Surfshark VPN。如果不阅读 Surfshark 提供给您的安装说明,很难确切知道您做错了什么。但是,根据您提供的输出,您可能希望按照以下方式继续操作。

获取安装脚本

使用Ctrl++打开终端并输入命令(从此处复制并粘贴):AltT

curl -O https://downloads.surfshark.com/linux/debian-install.sh

请注意,该选项-O是一个减号,后面跟着大写字母 O。该选项是命令curl保存将要下载的文件所必需的。如果没有该选项,curl则只会将文件内容转储到屏幕上。

笔记:Surfshark 的网页要求您使用选项-f。这是保存文件的错误选项。

交替你可以使用以下命令:

wget https://downloads.surfshark.com/linux/debian-install.sh

wget默认保存下载的文件。

现在如果你输入命令:

ls -l debian-install.sh

注意选项`-l,即小写字母EL。

如果该文件存在,你会看到类似这样的内容:

-rw-rw-r-- 1 akash akash 3269 Feb  7 17:04 debian-install.sh 

这表示该文件的所有者akash和所属组与该组同名。您和该组中的任何人akash都可以读取和写入此文件。

使脚本可执行

在 Ubuntu 中,脚本只是一个文本文件,除非您将其设置为可执行文件。以下命令将使任何人都可以执行该文件:

chmod +x debian-install.sh

现在如果你ls -l debian-install.sh再次使用该命令,你将看到输出

-rwxrwxr-x 1 akash akash 3269 Feb  7 17:04 debian-install.sh 

现在您可以运行安装脚本了。

运行安装脚本

通过阅读脚本,我知道该脚本可以以管理员身份运行。在 Ubuntu 中,我们使用 来执行此操作sudo prefix。在终端中输入以下命令:

sudo ./debian-install.sh

请注意./文件名前的 。这两个是必需的。 后面没有空格./

您也可以不使用 sudo 来运行该命令./debian-install.sh。如果您不使用 sudo,脚本会在需要的地方添加sudo。如果一切顺利,脚本将运行,并且调用的程序surfshark将安装在您的计算机上。

希望这可以帮助

相关内容