3

I am trying to install xclip on a linux computer with no root access, I downloaded, decompressed and run ./configure but got an error for a missing library:

./configure --prefix=/home/user/bin/xclip/ checking for gcc... /usr/bin/gcc [...] checking for XmuClientWindow in -lXmu... no configure: error: *** libXmu not found *** 

How can I get overcome this error and install xclip?

2 Answers 2

1

You need the libXmu library – if it's already installed, you're probably missing the development headers (/usr/include/X11/Xmu and others), which many distributions require to be installed separately.

You will have to either compile libXmu the same way manually, or obtain the libxmu-dev or libxmu-devel package and extract it into, say, ~/usr.

Afterwards, set:

export CFLAGS="-I$HOME/usr/include" export LDFLAGS="-L$HOME/usr/lib" 

You may also need:

export PKG_CONFIG_PATH="$HOME/usr/lib/pkgconfig:$HOME/usr/share/pkgconfig" 

Also take a look at xsel, which does pretty much the same thing but requires less library dependencies.


Note: --prefix ~/bin/xclip will result in ugly paths such as ~/bin/xclip/bin/xclip and ~/bin/xclip/share/man/man1/xclip.1. Something like --prefix ~/usr will give nicer results.

This is especially worth noting when installing libraries; it is much easier to compile a program when all its libraries are in --prefix ~/usr, rather than each having its own --prefix.

2
  • It seems there are xmu headers there: ls /usr/include/X11/Xmu Atoms.h CloseHook.h CurUtil.h DisplayQue.h Editres.h Error.h Initer.h Misc.h StdSel.h WidgetNode.h Xct.h CharSet.h Converters.h CvtCache.h Drawing.h EditresP.h ExtAgent.h Lookup.h StdCmap.h SysUtil.h WinUtil.h Xmu.h Commented Apr 10, 2012 at 11:47
  • It could be that it's just too old (the error message actually says that XmuClientWindow does not exist in libXmu; it is unclear as to whether the entire libXmu or just that single symbol is missing). Commented Apr 10, 2012 at 14:08
0

Here is my workaround (requires gvim and bash):

# My workaround for not having xsel or xclip function get_clip() { file=/tmp/$USER/clipboard_contents.txt /bin/rm -f $file # Help from: http://stackoverflow.com/a/23237529/120681 gvim $file -T dumb --noplugin -n -es -c 'set nomore' +'normal "*P' +'wq' cat $file } 

Which then can be used like:

clip=$( get_clip ) 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.