读《Python Web 自动化测试设计与实现》遇到的问题总结

一、在“2.3.3 在Kali Linux 2 中安装第三方程序”遇到问题

原始问题:在执行apt-get install apt-file遇到问题:“Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)”

解决方法:参照“https://blog.csdn.net/u011068702/article/details/54945396?utm_source=blogxgwz3”

  • sudo rm -rf /var/lib/dpkg/lock
  • sudo rm - rf /var/cache/apt/archives/lock

引发的新问题:"Unable to locate package apt-file"

解决方法:参照"https://blog.csdn.net/xiaogugood/article/details/18400669"

  • 需要先执行 sudo apt-get update

最后在执行:sudo apt-get  install apt-file

 

二、在“2.3.4 对Kali Linux 2网络进行SSH远程控制”遇到的问题

原始问题:重新创建一个新密钥,使用指令“dpkg-reconfigure openssh-server”,出现“rescue-ssh.target is a disabled or a static unit, not starting it”;

解决方法:参照“https://blog.csdn.net/hyg1165269653/article/details/89543558” 编辑服务配置文件;“需要编辑OpenSSH服务配置文件:/etc/ssh/sshd_config,将#PermitRootLogin without-password 更改为PermitRootLogin yes,”

引发的新问题:“Cant open file for writing”或“operation not permitted”

解决方法:参照“https://blog.csdn.net/yangkai_hudong/article/details/30513837” 左键要修改的文件,选择“open Terminal Here" 然后使用 sudo vi + 文件名 对文件进行编辑,i 进入编辑模式,esc退出编辑模式,然后":wq" 保存退出。

 

 

你可能感兴趣的:(python,linux)