Shell 将Debian 9(Stretch)后台端口添加到my sources.list
我正试图通过使用Certbot来保护一个网站,我遇到的问题是关于“伸展后端口” 这是certbot要求我的代码行,但是我得到一个错误,说“拉伸后端口”不是可用源的一部分Shell 将Debian 9(Stretch)后台端口添加到my sources.list,shell,security,debian,Shell,Security,Debian,我正试图通过使用Certbot来保护一个网站,我遇到的问题是关于“伸展后端口” 这是certbot要求我的代码行,但是我得到一个错误,说“拉伸后端口”不是可用源的一部分 $ sudo apt-get install certbot -t stretch-backports 所以我试着用这行代码添加Backport: deb http://ftp.debian.org/debian stretch-backports main 但“黛布”并没有被认出。因此,我安装了类似的gdebi: sudo
$ sudo apt-get install certbot -t stretch-backports
所以我试着用这行代码添加Backport:
deb http://ftp.debian.org/debian stretch-backports main
但“黛布”并没有被认出。因此,我安装了类似的gdebi:
sudo apt-get install gdebi
安装了它之后,我再次尝试了前一行,只是做了一点修改:
gdebi http://ftp.debian.org/debian stretch-backports main
现在显示“gdebi错误,未找到文件:”
所以我的问题是双重的,如果我没有在前面的步骤中搞砸,是否有人拥有拉伸后端口的地址和功能地址,gdebi是否是deb的良好替代品
提前谢谢。好的,我了解了它的工作原理并想回答,因为我觉得我找到的文档非常模糊,所以这就是如何将Debian 9 stretch Backport添加到源代码中的方法。列表:
- 手动并使用管理员权限,导航到/etc/apt/sources.list,然后创建您的stretch-backport.list文件,然后使用nano输入它,在我的例子中,我添加了以下整行:
deb http://ftp.debian.org/debian stretch-backports main
sudo nano /etc/apt/sources.list.d/stretch-backports.list
就这么简单,我可以使用下面这行代码,没有任何错误:
sudo apt-get install certbot -t stretch-backports
就在那里!希望我说得很清楚。引用
给杰西加上这句话
deb http://ftp.debian.org/debian jessie-backports main
deb http://ftp.debian.org/debian stretch-backports main
添加到您的源文件中。列出(或将扩展名为“.list”的新文件添加到
/etc/apt/sources.list.d/
)您还可以在
对于拉伸,请添加此行
deb http://ftp.debian.org/debian jessie-backports main
deb http://ftp.debian.org/debian stretch-backports main
添加到您的源文件中。列出(或将扩展名为“.list”的新文件添加到
/etc/apt/sources.list.d/
)您还可以在
现在,这些说明似乎非常清楚(而不是“非常模糊”),您应该编辑一个文件,而不是运行deb
命令
(可能“yoursources.list
”可以更改为“your/etc/apt/sources.list”您也可以通过echo将键附加到sources.list
sudo echo "deb http://deb.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list
我的完整安装脚本是(全部以root或sudo身份运行)
谢谢你的意见!但我们必须同意不同意,我看到了文件,对于一些官方的东西,我没有发现它是明确的,我坚持这一点!我承认我的答案并没有好多少,但多亏了你的介入,我的答案是可以的!对于管道版本,“sudo”需要在“tee-a”调用上,而不是在“echo”上