gitk installation not working in linux

10,310

Solution 1

Since gitk is distributed with git, I would focus on installing the right version of Tcl/Tk.

The git-gui package (even though it is not directly applicable to your Linux distribution) would use a tk8.6 at least. It looks like your version of tk is a bit old.

yum install tk

Solution 2

i'm not sure whether which flavour you are trying to install gitk.But below is the method which i have used to install gitk on rhel7

Get the endpoint release rpm from https://packages.endpoint.com/ as below

cd /tmp
wget https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
yum localinstall endpoint-repo-1.7-1.x86_64.rpm
yum install git-gui gitk

change current directory to one of your project where .git directory is there and type gitk and enterenter image description here

Share:
10,310
logan
Author by

logan

web designer ....

Updated on June 08, 2022

Comments

  • logan
    logan almost 2 years

    I have successfully git installed and running.

    git --version
    git version 2.6.1
    

    I want to add gitk now. I entered following command to install gitk package but it says no package available.

    sudo yum install git-gui gitk

    Returns

    Loaded plugins: security
    Setting up Install Process
    No package git-gui available.
    No package gitk available.
    Nothing to do
    

    After that, When I type gitk in command line it throws following error.

    Application initialization failed: Can't find a usable tk.tcl in the following directories: 
        /usr/lib/tcl8.4/tk8.4 /usr/lib/tk8.4 /local/p4clients/pkgbuild-9867w/workspace/build/TclTk/TclTk-8.4.199.32504/RHEL5_64/DEV.STD.PTHREAD/build/private/tcl/install/lib/tk8.4 /lib/tk8.4 /usr/library /library /tk8.4.12/library
    This probably means that tk wasn't installed properly.
    
    Error in startup script: invalid command name "tk_setPalette"
        while executing
    "tk_setPalette background $c selectColor $selc"
        (procedure "setui" line 8)
        invoked from within
    "setui $uicolor"
    

    Note: i tried apt-get but its not working in system. in a post i found that yum is the correct one for my system. apt-get: command not found