Trouble installing a binary clock programme(sorted)

Still learning CLI but I can’t see where I went wrong.
I can cd to the correct directory
I can “./configure”
I can “make”
But “make install” throws up “error 2”
Theses are the instructions that came with the programme

  1. `cd' to the directory containing the package's source code and type
     `./configure' to configure the package for your system.  If you're
     using `csh' on an old version of System V, you might need to type
     `sh ./configure' instead to prevent `csh' from trying to execute
     `configure' itself.

     Running `configure' takes awhile.  While running, it prints some
     messages telling which features it is checking for.

  2. Type `make' to compile the package.

  3. Optionally, type `make check' to run any self-tests that come with
     the package.

  4. Type `make install' to install the programs and any data files and

  5. You can remove the program binaries and object files from the
     source code directory by typing `make clean'.  To also remove the
     files that `configure' created (so you can compile the package for
     a different kind of computer), type `make distclean'.  There is
     also a `make maintainer-clean' target, but that is intended mainly
     for the package's developers.  If you use it, you may have to get
     all sorts of other programs in order to regenerate files that came
     with the distribution.

And this is what happened.

gill@gill-ThinkCentre-A50:~/Downloads/binaryclock-0.1.7$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.12.0... yes (version 2.26.1)
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.12.0... yes (version 2.22.0)
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether struct tm is in sys/time.h or time.h... time.h
checking for strchr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
gill@gill-ThinkCentre-A50:~/Downloads/binaryclock-0.1.7$ make
gdk-pixbuf-csource --rle --build-list img_led led.png img_led_lit led_lit.png >images.h
make  all-am
make[1]: Entering directory `/home/gill/Downloads/binaryclock-0.1.7'
if gcc -DHAVE_CONFIG_H -I. -I. -I.    -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -g -O2 -MT binclock-binclock.o -MD -MP -MF ".deps/binclock-binclock.Tpo" -c -o binclock-binclock.o `test -f 'binclock.c' || echo './'`binclock.c; \
	then mv -f ".deps/binclock-binclock.Tpo" ".deps/binclock-binclock.Po"; else rm -f ".deps/binclock-binclock.Tpo"; exit 1; fi
gcc  -g -O2   -o binclock  binclock-timer.o binclock-colorize.o binclock-binclock.o  -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng12 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   
make[1]: Leaving directory `/home/gill/Downloads/binaryclock-0.1.7'
gill@gill-ThinkCentre-A50:~/Downloads/binaryclock-0.1.7$ make install
make  install-am
make[1]: Entering directory `/home/gill/Downloads/binaryclock-0.1.7'
make[2]: Entering directory `/home/gill/Downloads/binaryclock-0.1.7'
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
  /usr/bin/install -c 'binclock' '/usr/local/bin/binclock'
/usr/bin/install: cannot create regular file `/usr/local/bin/binclock': Permission denied
make[2]: *** [install-binPROGRAMS] Error 1
make[2]: Leaving directory `/home/gill/Downloads/binaryclock-0.1.7'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/gill/Downloads/binaryclock-0.1.7'
make: *** [install] Error 2

Programme attached if required.

Sorted, had to run “make install” as “sudo make install”.

/usr/bin/install: cannot create regular file `/usr/local/bin/binclock’: Permission denied

It can’t create the directories it needs to because you haven’t given it permission to create anything outside your home directory… to create anything outside your home directory, you need root privileges… you can give a command temporary root privileges by prefixing it with sudo.

so the commands should have been:

sudo make install

The first 2 commands don’t need sudo, because they are only working in your home directory, but the “install” needs to work outside it.

If you ever see “permission denied” it usually means it needs to be run with root privileges.


Heh… didn’t see your edit :slight_smile:

Not quite there yet, when I try to “gedit /usr/local/bin/binclock” I get

Looks like you’re trying to edit a binary executable with a “text” editor… who told you to edit that file ? … if you were told to edit the configuration, it’s highly likely you are trying to edit the wrong file.

After reading the README file (contained in the archive), there are NO config files… it’s configured from the command line… so no need for gedit at all.


binclock -f dmIMS

(may need sudo prefix)

That’s my bad, I was guessing.
I can configure it from the command line but have to do it every time I run it, or is there a way to save the changes?
While you’re here, is there a way to have this launch at start up?

Go to “Startup Applications”, click “Add”, and make the Command: whatever you’ve been using to launch it up till now :wink:

Starting to like this command line, doesn’t it make thing easy.
Used it to configure the clock until I liked it then used the final command

binclock -D -f HM -s -h 30 -A

as the startup command, but that might still change.
Thanx for the hand holding Mark.