Getting libevent error when running installing tmux - tmux

configure: error: "libevent not found" when installing tmux
I downloaded the tmux tarball and trying to install it. I cannot connect to git on the server i am trying to install. This for a new Red Hat Enterprise Linux Server release 6.5 (Santiago) server.
I am new to Linux and never did installation as a root :)
[tmux-master]# ./configure && make
...
configure: error: "libevent not found"
Can you please suggest me how to get it working?

tmux depends on libevent. If you are using RHEL there is a libevent-devel package you can install.
But I think on RHEL6.5 it is libevent 1.4 which is very old (you normally need 2.x). 1.4 will still work with tmux but you need to make this change in tmux's control.c around line 79:
- line = evbuffer_readln(c->stdin_data, NULL, EVBUFFER_EOL_LF);
+ /* line = evbuffer_readln(c->stdin_data, NULL, EVBUFFER_EOL_LF); */
Another option is to build libevent 2.x yourself but that is probably more complicated for you.

I fixed the issue by using an alias as mentioned in the below link:
https://unix.stackexchange.com/questions/17907/why-cant-gcc-find-libevent-when-building-tmux-from-source/17918

Really, the real answer to this question is installing event2 with yum.
Use the following two commands--one erase, and then install:
sudo yum erase libevent-devel
sudo yum install libevent2-devel
TMUX should work after this.
If you want to keep the older version for consistency sake, you should not use the first (erase) command.

Related

Can't install a Julia package through a proxy connection

I tried the following command in Julia to install FixedEffectModels, but I'm getting this error:
julia> Pkg.add("FixedEffectModels")
INFO: Initializing package repository /root/.julia/v0.4
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
ERROR: failed process: Process(`git clone -q -b metadata-v2 git://github.com/JuliaLang/METADATA.jl METADATA`, ProcessExited(128)) [128]
in anonymous at ./pkg/dir.jl:52
I'm using a proxy connection, is it related?
On Windows 7, it seemed to me the .gitconfig worked. But are you sure it's in the correct user home directory (C:/Users/Username by default) and that it is really .gitconfig and not .gitconfig.txt (like I managed to do on my first attempt)?
Your home is root??
Look at this discussion could be inspiring.
export https_proxy=... and Pkg.setprotocol!("https") could probably help?
I also propose to upgrade julia. Because you are using Ubuntu, you could add this ppa:
sudo add-apt-repository ppa:staticfloat/juliareleases
sudo apt-get update
and you could have julia 0.5.2 (unfortunately it was not updated after 0.6)
But if you trust packages on github then you could probably download julia 0.6.1 too. :)
Thegit config --global url."https://github.com/".insteadOf git://github.com/ solve momentarily but after a server reboot it didn't worked anymore, the best solution found in this discussion was installing Julia 0.6+ because it can use the environment variables, so the export take effects in Julia.

Asterisk 11 /usr/sbin/asterisk not found

I have tried to install Asterisk 11 in my Ubuntu, but all time when I finished the installation, my Asterisk stopped suddenly and when I type asterisk -vvvvvvvvr it return /usr/sbin/asterisk not found
I also tried
You can fix this issue by compiling asterisk again.
do this:
cd /usr/src/asterisk-version
make distclean
make clean
./configure
make menuselect
make install
but not succeeded
What can happened?
You can configure asterisk with prefix
e.g
./configure --prefix=/usr/local
and then try
make && make install
and set the path variable appropriately to
e.g export PATH=$PATH:/usr/local/sbin/
In modern version you should do
ldconfig
After install of asterisk. If you install it in /usr/local/ path, you also should put /usr/local/lib/ into /etc/ld.so.conf.d/asterisk before that.
You can get info where you installed asterisk binary by using find utility
find / -name asterisk
whereis asterisk
if not found then it was not installed.
try restarting the service after install, once it stops
asterisk restart

Build m4, autoconf, automake, libtool on unix

I'm trying to setup PHP, apache environment on HP-UX server. While install i'm using usual commands of "./configur, make, make install". Here when I'm trying to install PCRE I got an error like follows.
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/ubuntu/softwares/m4-1.4.17/build-aux/missing aclocal-1.14 -I m4 /home/ubuntu/softwares/m4-1.4.17/build-aux/missing: line 81: aclocal-1.14: command not found WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/> Makefile:1496: recipe for target 'aclocal.m4' failed make: *** [aclocal.m4] Error 127
So I download latest versions of "m4, autoconf and automake" source and try to install using usual make command.
First I tried to install "automake" it through error asking to install "autoconf"
Then I tried to install autoconf again it ask to install "m4"
Then I tried to install "m4" now it through the same error above listed.
So it became a loop of same set of error not letting me to install.
Can any one help me to sort this issues. Please consider this is a HP-UX unix server so don't recommend the famous ubuntu "apt-get install" command or red hat specific commands.
First read William Pursell's comment to your post (above). If you still need to install the autotools ...
Check to see what, if any, autotools you may already have installed by typing: m4 --versionand autoconf --versionand automake --version.
You should use HP-UX's package manager. It's called Software Distributor (SD). http://en.wikipedia.org/wiki/Software_Distributor
HP-UX's FAQ 5.9 explains how to handle dependencies using depothelper. http://hpux.connect.org.uk/hppd/answers/5-9.html
Here is where you find the correct autotool packages (autoconf, automake, libtool) for HP-UX. Install these HP-UX packages using HP-UX's native package manager instead of compiling from source. http://hpux.connect.org.uk/hppd/packages.html
I was facing the same problem with m4. In my case, the problem was I was transferring all the source files via scp to a server.
When I tried to configure, make and make install through ssh, this kept happening. I believe something did not transfer the way it was supposed to.
The problem was solved by manually transferring the files
through a USB.
It's not a perfect solution (it implies physical access to the server) but it works.

Can't open sqlite3 "This script is just a wrapper for sqlite3"

I had a problem with use of arrow keys in sqlite3 on Mac OS 10.6.
I downloaded sqlite-autoconf-3080403.tar.gz. I did
./configure
make
sudo make install
Though the new sqlite3 wasn't configured by my machine and I deleted the old sqlite3 in /usr/bin/sqlite3 and moved the new one.
Then when I did
sqlite3
I got this message:
error: '/usr/bin/.libs/sqlite3' does not exist
This script is just a wrapper for sqlite3.
See the libtool documentation for more information
Then I tried to upgrade sqlite using brew but maybe it was too late by then because I still get the same error msg.
Does anyone know how to fix this?
Thanks in advance!
BTW I can use sqlite3 when I'm in the decompressed sqlite-autoconf folder.
I solved my own question by typing this command into the Terminal:
$ export PATH=/usr/local/Cellar/sqlite:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
I found these articles helpful:
Installed sqlite3 v3.8, but mac terminal still runs old version 3.6 by default
Brew doctor says: "Warning: /usr/local/include isn't writable."
In my clumsy experience, don't ever do:
rm /usr/bin/sqlite3
Instead use brew if you are using Mac OS.

installing R packages on ubuntu 8.10

preface: i'm an os x user coming to linux, so excuse my ignorance in advance
I've installed R using synaptic and now i'm trying to install packages.
I open R then try
install.packages("some_package")
system tries to default to /site-library, then tells me it's not writable, then asks about making a personal library?
Should I just make site-library writable? Or is there something more to this?
The directory /usr/share/local/lib/R is the default location; the directory is has ownership root:staff by default. If you add yourself to group staff (easiest: by editing /etc/group and /etc/gshadow) you can write there and you do not need sudo powers for the installation of packages. That is what I do.
Alternatively, do apt-get install littler and copy the example file /usr/share/doc/littler/examples/install.r to /usr/local/bin and chmod 755 it. The you can just do sudo install.r lattice ggplot2 to take two popular examples.
BTW Ubuntu 8.1 does not exist as a version. Maybe you meant 8.10? Consider upgrading to 9.10 ...
Edit: Also have a look at this recent SO question.
I faced the same issue. The most convenient way is to start R as super user.
sudo R
After that, install.packages("some package") should work.
If you are the only user who needs those packages, then the easiest and neatest way is to let R create a personal library for you. That way you don't need to mess with the system directories managed by the package management system.
Another way to install some packages in Ubuntu is to look for Ubuntu packages with names like r-cran-*. This way you do not have to worry about dependencies, the packages become available to all users, and updates are taken care of by the Ubuntu package management system. But only a small proportion of CRAN packages are available this way and you may not get the latest version.
Well, I prefer to install packages into local R folder ~/R/, but it's just a matter of an individual preference... you can also grant yourself a write permission to default library, it doesn't make any difference.
Be sure to add up-to-date packages. Those packages available in default repos are quite old. R v.2.9.0 is available by default in 9.10, while v.2.10.1 is now available.
So stay up-to-date, add this line to file /etc/apt/sources.list (replace <text> with CRAN server address, you can find server addresses on www.r-project.org > CRAN > Linux > Ubuntu):
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu karmic/
then run this line in terminal:
gpg --keyserver subkeys.pgp.net --recv-key E2A11821 && gpg -a --export E2A11821 | sudo apt-key add -
and if keys are imported properly, run:
sudo apt-get install r-base-core
or if you already installed R, run:
sudo apt-get update && sudo apt-get upgrade
you should also check for alias functions (try man alias in terminal) to automatize repetitive tasks... feel comfortable in terminal, Synaptic is indeed a good tool, but most Linux users prefer command-line approach for a good reason - it's highly customizable =)
I recommend that you stick with one server (be advised when choosing the default server - I prefer UCLA's server, Berkeley works just fine, Main server is usually busy as hell... so there...)
Alternatively, you can add default CRAN server to .First() function:
# replace '<server address>'
.First() <- function() {
options("repos" = c(CRAN = "<my.favorite.cran.mirror>"))
}
now you can just type:
> install.packages('<somepackage>')
and you'll lose the boring Tcl/Tk serverlist window! Oh, what a relief!
Welcome to Ubuntu!
Cheers, mate!

Resources