透明水晶 2023-08-30 22:44 采纳率: 96.8%
浏览 7
已结题

WSL中如何使用git citool

WSL中如何使用git citool

img

$ git citool
git: 'citool' is not a git command. See 'git --help'.

The most similar command is
        difftool

[@ ~]$ sudo apt-get install git
[sudo] password for fly:
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.25.1-1ubuntu3.5).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gitkraken : Depends: libatk-bridge2.0-0 (>= 2.5.3) but it is not going to be installed
             Depends: libatk1.0-0 (>= 2.2.0) but it is not going to be installed
             Depends: libatspi2.0-0 (>= 2.9.90) but it is not going to be installed
             Depends: libcups2 (>= 1.7.0) but it is not going to be installed
             Depends: libgbm1 (>= 12.0.0~0) but it is not going to be installed
             Depends: libgtk-3-0 (>= 3.9.10) but it is not going to be installed
             Depends: libpango-1.0-0 (>= 1.14.0) but it is not going to be installed
             Depends: libxdamage1 (>= 1:1.1) but it is not going to be installed
             Depends: libxkbcommon0 (>= 0.5.0) but it is not going to be installed
             Depends: libnotify4 but it is not going to be installed
             Depends: xdg-utils but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

[fly@ThinkPad-FLY ~]$ sudo apt-get install gitk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gitk : Depends: git (< 1:2.17.1-.) but 1:2.25.1-1ubuntu3.5 is to be installed
E: Unable to correct problems, you have held broken packages.
[fly@ThinkPad-FLY ~]$ sudo apt-get install git-gui
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 git-gui : Depends: git (< 1:2.17.1-.) but 1:2.25.1-1ubuntu3.5 is to be installed
           Recommends: gitk but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


[fly@752fac4b02e9 ~]$ git citool
application-specific initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name "tk_messageBox"
    while executing
"tk_messageBox  -icon error  -type ok  -title "git-gui: fatal error"  -message $err"
    invoked from within
"if {[catch {package require Tcl 8.4} err]
 || [catch {package require Tk  8.4} err]
} {
        catch {wm withdraw .}
        tk_messageBox \
                -icon error \
                -typ..."
    (file "/usr/lib/git-core/git-citool" line 33)

  • 写回答

2条回答 默认 最新

  • 透明水晶 2023-10-31 13:49
    关注

    操作

    [fly@ThinkPad-FLY smart-car]$ sudo apt-get autoremove git --purge
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
      git* git-man* liberror-perl*
    0 upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
    After this operation, 1894 kB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 47708 files and directories currently installed.)
    Removing git-man (1:2.25.1-1ubuntu3.5) ...
    Removing liberror-perl (0.17029-1) ...
    Processing triggers for man-db (2.9.1-1) ...
    (Reading database ... 47521 files and directories currently installed.)
    Purging configuration files for git (1:2.25.1-1ubuntu3.5) ...
    [fly@ThinkPad-FLY smart-car]$ sudo apt install git
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following additional packages will be installed:
      git-man liberror-perl
    Suggested packages:
      git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
    The following NEW packages will be installed:
      git git-man liberror-perl
    0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
    Need to get 4817 kB of archives.
    After this operation, 34.3 MB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://mirrors.aliyun.com/ubuntu bionic/main amd64 liberror-perl all 0.17025-1 [22.8 kB]
    Get:2 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 git-man all 1:2.17.1-1ubuntu0.18 [804 kB]
    Get:3 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 git amd64 1:2.17.1-1ubuntu0.18 [3990 kB]
    Fetched 4817 kB in 2s (3199 kB/s)
    Selecting previously unselected package liberror-perl.
    (Reading database ... 47520 files and directories currently installed.)
    Preparing to unpack .../liberror-perl_0.17025-1_all.deb ...
    Unpacking liberror-perl (0.17025-1) ...
    Selecting previously unselected package git-man.
    Preparing to unpack .../git-man_1%3a2.17.1-1ubuntu0.18_all.deb ...
    Unpacking git-man (1:2.17.1-1ubuntu0.18) ...
    Selecting previously unselected package git.
    Preparing to unpack .../git_1%3a2.17.1-1ubuntu0.18_amd64.deb ...
    Unpacking git (1:2.17.1-1ubuntu0.18) ...
    Setting up liberror-perl (0.17025-1) ...
    Setting up git-man (1:2.17.1-1ubuntu0.18) ...
    Setting up git (1:2.17.1-1ubuntu0.18) ...
    Processing triggers for man-db (2.9.1-1) ...
    [fly@ThinkPad-FLY smart-car]$ git citool
    git: 'citool' is not a git command. See 'git --help'.
    
    The most similar command is
            difftool
    [fly@ThinkPad-FLY smart-car]$ git --version
    git version 2.17.1
    [fly@ThinkPad-FLY smart-car]$ git citool
    git: 'citool' is not a git command. See 'git --help'.
    
    The most similar command is
            difftool
    [fly@ThinkPad-FLY smart-car]$ sudo apt-get install git-gui
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following additional packages will be installed:
      gitk
    Suggested packages:
      git-doc aspell
    The following NEW packages will be installed:
      git-gui gitk
    0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
    Need to get 352 kB of archives.
    After this operation, 3810 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 git-gui all 1:2.17.1-1ubuntu0.18 [215 kB]
    Get:2 http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 gitk all 1:2.17.1-1ubuntu0.18 [137 kB]
    Fetched 352 kB in 1s (663 kB/s)
    Selecting previously unselected package git-gui.
    (Reading database ... 48427 files and directories currently installed.)
    Preparing to unpack .../git-gui_1%3a2.17.1-1ubuntu0.18_all.deb ...
    Unpacking git-gui (1:2.17.1-1ubuntu0.18) ...
    Selecting previously unselected package gitk.
    Preparing to unpack .../gitk_1%3a2.17.1-1ubuntu0.18_all.deb ...
    Unpacking gitk (1:2.17.1-1ubuntu0.18) ...
    Setting up git-gui (1:2.17.1-1ubuntu0.18) ...
    Setting up gitk (1:2.17.1-1ubuntu0.18) ...
    Processing triggers for man-db (2.9.1-1) ...
    [fly@ThinkPad-FLY smart-car]$ git citool
    

    说明

    按照上述操作即可在wsl中使用git citool;

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 11月8日
  • 已采纳回答 10月31日
  • 修改了问题 8月30日
  • 修改了问题 8月30日
  • 展开全部

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀