environment: centos
My global python version is 2.7, but I use pyenv to create a python version 3.6.
I want to build vim8 with python3.
According the instruction on the net, I use
./configure --with-features=huge \
--enable-multibyte \
--enable-python3interp=yes \
--with-python3-config-dir=/root/.pyenv/versions/3.6.3 \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr/local
make && make install
Vim8 is built ok, but it without python3:
vim --version
The list shows -python and -python3.
I dont't know what's wrong.
Related
I am trying to compile FFmpeg with SVT-AV1 codec, following instructions from here: https://github.com/OpenVisualCloud/SVT-AV1/tree/master/ffmpeg_plugin
Everything goes well, but when I try to run
./configure --enable-libsvtav1
I am getting
ERROR: SvtAv1Enc not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user#ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
The content of the ffbuild/config.log: https://pastebin.com/euPriFAp
There is an exact issue on the github: https://github.com/OpenVisualCloud/SVT-AV1/issues/35, but is closed as solved.
I have tried both on my Mac and in the Docker container with Ubuntu 18.04, but getting the same result.
Could anyone please help, what am I doing wrong?
The problem was in the lack of requred libraries. Please find the complete installation instruction below.
Installing packages required for compiling:
sudo apt-get update
sudo apt-get install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
pkg-config \
texinfo \
wget \
zlib1g-dev
Installing assemblers used by some libraries:
sudo apt-get install nasm
sudo apt-get install yasm
Build and install SVT-AV1:
git clone --depth=1 https://github.com/OpenVisualCloud/SVT-AV1
cd SVT-AV1
cd Build
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make -j $(nproc)
sudo make install
Apply SVT-AV1 plugin and enable libsvtav1 to FFmpeg:
cd ~
git clone -b release/4.2 --depth=1 https://github.com/FFmpeg/FFmpeg ffmpeg
cd ffmpeg
export LD_LIBRARY_PATH+=":/usr/local/lib"
export PKG_CONFIG_PATH+=":/usr/local/lib/pkgconfig"
git apply ../SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch
./configure --enable-libsvtav1
(Note: if you want other codecs to be supported please add the required flags to the ./configure command)
Build FFmpeg:
make
make install
hash -r
source ~/.profile
Now you should have ffmpeg command working and have svt-av1 in encoders list:
ffmpeg -encoders
...
V..... libsvt_av1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1)
...
I used next docs a reference:
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
https://github.com/OpenVisualCloud/SVT-AV1/tree/master/ffmpeg_plugin
Installing laravel 5.7 app in docker I need to install npm/nodejs and for this in my web/Dockerfile.yml I added lines for node:
FROM php:7.2-apache
RUN apt-get update && \
apt-get install -y \
python \
libfreetype6-dev \
libwebp-dev \
libjpeg62-turbo-dev \
libpng-dev \
nano \
git-core \
curl \
build-essential \
openssl \
libssl-dev \
libgmp-dev \
libldap2-dev \
netcat \
sqlite3 \
libsqlite3-dev \
&& git clone https://github.com/nodejs/node.git \
&& cd node \
&& ./configure \
&& make \
&& make install
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-webp-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install gd pdo pdo_mysql pdo_sqlite zip gmp bcmath pcntl ldap sysvmsg exif \
&& a2enmod rewrite
COPY virtualhost.conf /etc/apache2/sites-enabled/000-default.conf
Running
docker-compose up -d --build
command had a long output and all was run ok
But entering the shell , I found that I have no nodejs, as I expected by installing node.git
/var/www/html# npm -v
6.11.3
/var/www/html# nodejs -v
bash: nodejs: command not found
/var/www/html# composer install
bash: composer: command not found
What is wrong ?
Use node -v instead of nodejs.
-v, --version print Node.js version
or you can explore further option using
node --help
during build time
RUN node --version
Test Node Version
To see if Node is installed, type node -v in Terminal. This should
print the version number so you’ll see something like this v<version>.
I'm unable to use other fonts than the standard one in rrdgraph.
It may have to do with the fact, that this Alpine has no GUI (all the X-stuff), I don't know.
I found this issue https://bugs.alpinelinux.org/issues/1475 dealing with missing fonts, but installing those packages doesn't help.
This is my Dockerfile
FROM alpine:3.3
RUN apk --update add \
build-base python-dev \
ca-certificates python \
py-pip \
py-jinja2 \
py-dateutil \
py-tz \
py-requests \
py-pillow \
py-rrd && \
pip install --upgrade arrow \
websocket-client \
XlsxWriter && \
apk del build-base python-dev && \
rm -rf /var/cache/apk/* && \
echo "iot"
CMD ["/bin/sh"]
I added those font packages manually later on with a docker exec -it iot /bin/sh
I tried stuff like
# rrd_graph_fmt += ["--font", "LEGEND:8:'/home/user/data/fonts/Roboto-Regulars.ttf'"]
# rrd_graph_fmt += ["--font", "LEGEND:8:font-sony-misc"]
but it just doesn't work. I'm not even sure how to change the font globally by using environment variables. I tried (some stuff on the web with the env vars), but it didn't work.
I'd really love to use ttf fonts, but would settle with those in the packages if neccessary.
I'm using the rrdtool lib from the py-rrd package.
Does anyone have an idea on how to get this working?
RRDtool uses fontconfig to access fonts ... to see what fonts are available on your system you can use
fc-list
to configure where fontconfig should look for fonts, you may want to edit /etc/fonts/... or ~/.fonts.conf.d in your homedirectory.
To refresh the list of fonts, run
fc-cache
Note that font support is independent of X11.
I use VIM a lot, and have previously been able to get +xterm_clipboard support working by using a script provided in a separate post on StackOverflow. I've re-installed Ubuntu on my machine, and have since migrated from Ubuntu 14.04.4 LTS (Wily) to Ubuntu 16.04 LTS (Xenial).
# Get the compile-dependencies of vim
sudo apt-get build-dep vim
# If you haven't got mercurial, get it
sudo apt-get install mercurial
# Get the source
hg clone https://vim.googlecode.com/hg/ vim_source
# Compile it
cd vim_source
./configure \
--enable-perlinterp=dynamic \
--enable-pythoninterp=dynamic \
--enable-rubyinterp=dynamic \
--enable-cscope \
--enable-gui=auto \
--enable-gtk2-check \
--enable-gnome-check \
--with-features=huge \
--with-x \
--with-compiledby="Your Name <youremail#domain.com>" \
--with-python-config-dir=/usr/lib/python2.7/config
make && sudo make install
However, this no longer works, and I can't make use of ",+,y to yank buffers to the system clipboard. I don't see anything obvious in the .configure output, but vim --version always shows -xterm_clipboard when I build it. How do I fix this?
You should have noticed that the source is no longer hosted on Google code via mercurial (hg) anymore, and has migrated to GitHub in the error messages generated by the provided script.
You'll need to use the new source tree, git, and some developer libraries will need to be installed in advance.
Code Listing (Updated for Ubuntu 18.04 and onward)
# Get the compile-dependencies of vim
sudo apt-get -y build-dep vim
# Install the "checkinstall" tool so the "make install" step is
# wrapped and the result is a .deb file that can be removed later by
# your package manager rather than having to hunt down every file deployed
# by "make install", which might not be possible if it overwrites existing
# system files.
sudo apt-get -y install checkinstall
# Install python dev
sudo apt-get -y install python3-dev
# Install xorg dev
sudo apt-get -y install xorg-dev
# Install git
sudo apt-get -y install git
# Get the source
git clone https://github.com/vim/vim.git vim_source
# Remove ./configure cache in case we have to run this twice due to permissions
# related issues.
rm vim_source/src/auto/config.cache
# Compile it
cd vim_source
make clean distclean
./configure \
--enable-perlinterp=yes \
--enable-python3interp=yes \
--enable-rubyinterp=yes \
--with-python3-command=python3.6 \
--with-python3-config-dir=$(python3.6-config --configdir) \
--enable-cscope \
--enable-gui=auto \
--enable-gtk2-check \
--enable-gnome-check \
--with-features=huge \
--with-x \
--with-compiledby="DevNull <darkstar#/dev/null>"
# Build quickly (parallel jobs).
make -j$(nproc)
# Need root to install
sudo checkinstall
I want to compile the current version of vim with:
+clipboard +xterm_clipboard and ruby support
But every time I compile it the clipboard and the xterm_clipboard options aren't enabled.
Is there a lib needed or must I add any other options in the configuration step?
./configure \
--enable-rubyinterp=dynamic \
--enable-cscope \
--enable-gui=auto \
--enable-gtk2-check \
--enable-gnome-check \
--with-features=huge \
--with-x
make && sudo make install
You can see if configure manage to find a working X lib by checking the output of (or scroll through the output of configure in your terminal):
$ grep X11 src/auto/config.h
#define HAVE_X11
If configure failed then you'll see:
$ grep X11 src/auto/config.h
/* #undef HAVE_X11 */
You'll need to install the appropriate X development library like xlib and xtst for --with-x to work.
On ubuntu it should be enough to install libx11-dev and libxtst-dev.
ubuntu18.04.4
sudo apt install libx11-dev libxtst-dev libxt-dev libsm-dev libxpm-dev
./configure --enable-python3interp=dynamic --prefix=$HOME/.local --enable-rubyinterp=dynamic --enable-gtk2-check --enable-gnome-check --with-features=huge --with-x
make install
./src/vim ---version | grep clip