5

I have successfully Git installed and running.

git --version
git version 2.6.1

I want to add gitk now. I entered the following command to install the 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 on the command line, it throws the 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 it’s not working in the system. In a post I found that YUM is the correct one for my system.

Amazon Linux: apt-get: command not found

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
logan
  • 7,946
  • 36
  • 114
  • 185
  • 1
    Are you sure that you're using `yum` on Ubuntu? I haven't heard of that combo before. – Maximillian Laumeister Dec 10 '15 at 18:24
  • i tried `apt-get` but its not working in system. in a post i found that `yum` is the correct one for my system. http://stackoverflow.com/questions/32592956/apt-get-command-not-found – logan Dec 10 '15 at 18:26
  • From what I've gathered, your system doesn't include a `yum` repository containing `gitk`. This may help: http://serverfault.com/a/686181/297452 – Maximillian Laumeister Dec 10 '15 at 18:33
  • @MaximillianLaumeister : So you meant to say once i add those missing files , i will work ? – logan Dec 10 '15 at 18:39
  • @MaximillianLaumeister : Please note that i have already installed git. Now i am trying install for gitk only – logan Dec 10 '15 at 18:41
  • If I knew exactly how to fix it I would definitely post an answer, just trying my best to be helpful in the comments! I'm not sure if the answer I linked is strictly relevant here, but hopefully it might give you some ideas. – Maximillian Laumeister Dec 10 '15 at 21:16
  • @MaximillianLaumeister : Thanks. waiting for your ideas :) – logan Dec 11 '15 at 12:02
  • I would recommend using `git` on the command line. Perhaps also use it thru emacs (Version Control mode) – Basile Starynkevitch Jan 22 '16 at 09:01
  • @BasileStarynkevitch : Could you please let me know how to use it through emacs ? – logan Jan 22 '16 at 15:39

3 Answers3

2

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
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

I'm not sure which flavour you are trying to install gitk on. But the below is the method which I have used to install gitk on RHEL 7.

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 the current directory to one of your projects where the .git directory is there and type gitk and Enter:

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
JPNagarajan
  • 802
  • 1
  • 12
  • 32
-1

Note that the URL for the yum repository mentioned has moved to End Point Software Package Repositories

There are specific setup instructions for new Git on CentOS 7 at Installing Git 2 on CentOS 7.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jon Jensen
  • 61
  • 1
  • 4
  • Written by you, presumably. Shouldn't that be revealed? See e.g. *[What is the policy for linking to your own blog in your answers?](https://meta.stackoverflow.com/questions/254280/what-is-the-policy-for-linking-to-your-own-blog-in-your-answers)* and *[Limits for self-promotion in answers](https://meta.stackexchange.com/questions/57497/limits-for-self-promotion-in-answers)*. – Peter Mortensen May 09 '22 at 21:01