Skip to content

Commit

Permalink
feat: 增加依赖问题的进一步提示
Browse files Browse the repository at this point in the history
  • Loading branch information
fishros committed Sep 13, 2023
1 parent 4748d51 commit de9a62c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tool_install_ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ def choose_and_install_ros(self):
if FileUtils.check_result(cmd_result,['未满足的依赖关系','unmet dependencies','but it is not installable']):
# 尝试使用aptitude解决依赖问题
PrintUtils.print_warn("============================================================")
PrintUtils.print_delay("请注意我,检测你在安装过程中出现依赖问题,请在稍后输入n,再选择y,即可解决")
PrintUtils.print_delay("请注意我,检测你在安装过程中出现依赖问题,请在稍后输入n,再选择y,即可解决(若无法解决,清在稍后手动运行命令: sudo aptitude install {})".format(RosVersions.get_desktop_version(install_version)))
import time
input("确认了解情况,请输入回车继续安装")
cmd_result = CmdTask("sudo {} install {}".format(install_tool,RosVersions.get_desktop_version(install_version)),300,os_command=True).run()
cmd_result = CmdTask("sudo {} install {} -y".format(install_tool,RosVersions.get_desktop_version(install_version)),300,os_command=False).run()

# apt broken error
if cmd_result[0]!=0:
if FileUtils.check_result(cmd_result[1]+cmd_result[2],['apt --fix-broken install -y']):
if FileUtils.check_result(cmd_result[1]+cmd_result[2],['sudo apt --fix-broken install -y']):
if code==2: cmd_result = CmdTask("sudo {} install {} -y".formatinstall_tool,(dic_base[rosname]),300,os_command=False).run()
elif code==1: cmd_result = CmdTask("sudo {} install {} -y".format(install_tool,rosname),300,os_command=False).run()

Expand Down

0 comments on commit de9a62c

Please sign in to comment.