Im trying to install the VMOD called basicauth.
This is the repo: https://git.gnu.org.ua/vmod-basicauth.git
There is also a README file which is supposed to help guide you through the process.
It tells you to pull the code, also pull code of varnish (did that with help of sudo apt-get source varnish )... I did that, so far so good.
But then Im supposed to do this:
run:
./configure --with-varnish-source=/usr/src/varnish-3.0.1 --with-vmod-dir
THE PROBLEM
I have been trying to figure out where to find that "configure" script. I have no idea where to find it.
When I look at other tutorials, like this one I guess that it should within the vmod-basicauth folder... but it is not. There is only configure.ac. It tried running that file, but that does not work. Does anyone of you know how I can install this VMOD? Any tips or help would be appreciated.
Also: it seems there is only information off very old tutorials and repos... any idea where I could some more up to date infos?
UPDATE
I have also downloaded "The Varnish Book" now, checked on how to isntall "libvmod-example." Within that folder there is a "autogen.sh" file that create the "configure" file. But I also cannot find a any "autogen.sh" in the basicauth package...
Hahha ..... arrrrrrr Im getting nowhere.
Does anyone know where I can find a good tutorial?
Im wokring with ubuntu-server currently. Noticed that redhad has VMODs in their repos, but that won't help me ;)
SYSTEM INFO
Here is some more info about my system:
dpkg -l | grep varnish
ii libvarnishapi-dev:amd64 6.2.1-2 amd64 development files for Varnish
ii libvarnishapi2:amd64 6.2.1-2 amd64 shared libraries for Varnish
rc varnish 6.2.1-2 amd64 state of the art, high-performance web accelerator
Serverifno (a local development VM in this case):
Best,
AuthenticPinguin
I just tested it, and I didn't experience any problems compiling the VMOD.
Here's a step-by-step guide on how to install it.
1. Get a recent Varnish version
I'm not sure whether or not you installed Varnish through the Ubuntu packages, but I advise you to install it via the official packages: https://packagecloud.io/varnishcache/.
2. Install the build dependencies
Install the required build dependencies by using the following command:
apt-get install -y varnish-dev autoconf automake gcc libtool make python3-docutils git
Most of these dependencies are trivial, but there's one specific package that might not be found unless you're using the official Varnish package repo. It's varnish-dev.
I've tried looking for it natively in the Ubuntu Focal repository, and the closest I came was libvarnishapi-dev, but that didn't really work.
That's why I advise using the official packages from https://packagecloud.io/varnishcache/. The version I prefer is https://packagecloud.io/varnishcache/varnish60lts, because it's the LTS version.
3. Get the source code
Once you've put all the dependencies in place, you can go ahead and download the VMOD source code by running the following commands:
cd /usr/src/
git clone git://git.gnu.org.ua/vmod-basicauth.git
As you can see the code will be place in the /usr/src directory.
4. Compile the code
Now that the source code is on your system, you run the following commands to configure, compile and install the VMOD code:
./bootstrap
./configure
make
make install
If ./configure cannot be found, it means it wasn't properly generated by the ./bootstrap command. If that happens, have a look at the output of your ./bootstrap command to figure out what went wrong.
5. Import the VMOD
The VMOD has been installed in the proper location, so it's time to import it into your VCL file and use its features.
Here's a VCL example:
vcl 4.1;
import basicauth;
sub vcl_recv {
if (!basicauth.match("/var/www/.htpasswd",req.http.Authorization)) {
return(synth(401,"Authentication required"));
}
}
Related
I need libv8-3.14 to run some R packages on linux, but I don't have root access/sudo access on the linux computer I'm using so I'd like to install an external folder instance of libv8-3.14. I've seen R packages reference this as external as CDFLAG="folder/v8-3.14" so I know it is possible.
I'm new(ish) to linux but I've installed external libraries before with tar.gz files which then have a configure file in them, which I set the external folder with ./configure --prefix==/folder/loc, but the only downloads I can find of libv8 are .git (which I can't get to work either).
How can I install an libv8-3.14 to a folder and install so I can set:
export PATH=$PATH:/path/to/install/
and
export `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/install/`
I had the exact same problem. In case somebody in the future comes across this post, I will leave my suggestions and how it worked out in the end. Also, all credits go to an experienced colleague of mine.
The most sure thing to do is to consult IT, or someone who has already had the same problem, there is usually a workaround these issues.
A way you can do it yourself:
Create an anaconda environment, you can name it 'V8' or something (make sure the environment is based on the latest python version, or recent enough for r-v8).
activate it
install the conda version of the V8 R interface with conda install -c conda-forge r-v8
That's it. Whenever you need V8, fire up your environment beforehand, and it should be A-OK.
Further advice: If you run into errors when installing r-v8, it may be a good idea to update your conda and all the packages. However, depending on your conda version conda update conda and conda upgrade --all MAY BREAK your conda installation, so be careful. (For further information on this problem, see the endless complaints of people in this issue: https://github.com/conda/conda/issues/8920).
V8 doesn't use autotools, so it has no ./configure. In fact, it provides no installation facilities at all, because it is meant for embedding, not installing.
What I would try is to download the Ubuntu package (guessing from your other question, you are on Ubuntu, right?) for the right architecture from https://packages.ubuntu.com/trusty/libv8-3.14.5, and extracting it manually. .deb files are just ZIP archives.
As a side note, there's no point in setting PATH, because libv8, being a library, provides no executables. LD_LIBRARY_PATH is all you need.
I got a source code from github. It writen by Qt, and I have installed the Qt from the Qt official website. But when I run ./configure. It said error: cannot find QtGui. What can I do? I don't want to install duplicated through the apt-get. I set the LD_LIBRARY_PATH in .zshrc. It's not work.
The usual way is to install dependencies through apt-get. If you install them manually, you need to resolve path issues by your own.
Since you've chosen the dark path, now you need to manually inform configure where your QT include files and libraries are located:
export CPPFLAGS='-I/qt/path/include'
export LDFLAGS='-L/qt/path/lib/'
./configure
One-liner:
env CPPFLAGS='-I/qt/path/include' LDFLAGS='-L/qt/path/lib/' ./configure
More info is here.
I met a problem when I try to install QEMU with spice support.
It works well if I install spice-server with yum. In this case when I type ./configure --enable-spice in root directory of QEMU's source codes, the spice-server can be detected correctly.
But now I want to install spice-server by compiling its source codes, cause I have some work to do with it.
I tried ./configure; make; make install and ./configure --prefix=/usr; make; make install. QEMU couldn't find spice-server installed in neither way. I just got
ERROR: User requested feature spice
configure was not able to find it.
Install spice-server(>=0.12.0) and spice-protocol(>=0.12.3) devel
returned.
I don't have this problem in ubuntu, I don't know how to fix it in a CentOS server. Does anybody have a solution?
I guess you are trying to build qemu with spice from source code.
That involves many dependences and configurations.
Especially while you have system-installed 'qemu' running.
Maybe https://github.com/grizzlybears/sqb can help you.
It is a set of helper scripts to automatically do the follwing:
Install build depend.
Get code from offical repository
Get 'fedora base cloud image' as test image
Autogen/configure/build qemu with spice in local dir, touch nothing in system
5.Run test VM using our hand-made 'qemu'
Open spice console to the VM, if you have 'spice-gtk-tools' installed
You should first clone spice-protocol manually and execute ./autogen.sh && ./configure &&make &&make install and export the PKG_CONFIG_PATH export PKG_CONFIG_PATH={your pkg config path}
I installed the luarocks package on Linux Mint, and afterwards installed a couple of rocks such as sudo luarocks install telescope, but when running a script via lua script.lua, require cannot find the module.
Meta: Doing this Q&A style, because while questions that answer this exist, none seem to be generically titled or easily findable, and I hope that I can help someone with this.
In this specific case, the problem was simply that on my distribution, the default Lua version installed was at the time of writing this 5.2, whereas the LuaRocks package was built for 5.1, meaning that Lua 5.2 could not find the rocks due to using different paths for modules.
The solution to the problem was downloading the LuaRocks source code from its github repository, and compiling it for 5.2
./configure --lua-version=5.2
make build
sudo make install
To make sure I can also install packages for LuaJIT, which as of the moment uses 5.1 libs, I have also executed the above lines with lua-version=5.1 beforehand (if I executed them after, the default luarocks command would point at the 5.1 build.
To build LuaRocks, you need liblua5.2-dev and/or liblua5.1-dev
The solution for me is this.
I try
eval "$(luarocks path)"
and it works.
Hope it works for others.
I'm trying to modify GTK2 on Ubuntu Oneiric.
I download the source:
apt-get source libgtk2.0-0
cd gtk+2.0-2.24.6/
I try to compile and overwrite the current GTK2:
./configure --prefix=/usr
sudo make
Soemhow I get an error (I have all the necessary libraries and the build-essential package etc):
In file included from gtkquery.c:26:0:
gtkquery.h:31:2: error: #error "gtkfilechooserprivate.h is not supported API for general use"
By the way, I am able to modify and recompile GTK3 with no problems with the same steps.
If use debuild, I get thousands of
dpkg-source: error: cannot represent change to gtk+2.3.0-2.24.6/gtk+2.0-2.24.6/something: binary file contents changed
You won't get anything near the Ubuntu-provided build if you try building it by hand that way -- you'll miss all the ./configure options and other settings. (Look into debian/rules for the full details of what they're setting.)
Instead, try debian/rules build.
For reasons I haven't investigated yet (possibly including me not understanding how it should work), that didn't work on the first package I tried, but setting up pbuilder let me build the package I wanted.
It might feel like overkill to get a clean chroot as a build environment, but it is way too easy to build yourself problems that no one else in the world can replicate because you've got something funny on your local system.