How to install stable and ~fresh Pandoc on UBUNTU? - upgrade

"Near fresh" here means "reasonably new", nowadays, "same year" or "1 year old"... Maybe "2 years old" also reasonable.
I used apt install pandoc today at UBUNTU 16 LTS, and for my surprise it is not a "fresh version", a very old version was installed: pandoc --version is 1.16.0.2 (of 2015!!) instead a 2019 version, v2.9. Out of curiosity I did the same on other machine with UBUNTU 18 LTS, same ugly surprise.
How to install stable "recent Pandoc", and not a 5 years-old version? Or how to upgrade it by "plug and play mode"?
PS: internet/google show nothing, only very confuse comments. Install page also very confuse. No "clean and objective" install instruction for apt neither upgrade... Only other topic, "cabal update".

        ((please edit and update if necessary: this answer is a Wiki!))
The command line when I type "pandoc" on the UBUNTU terminal is "use apt install pandoc"... It is bad instruction!
... And the installing page don't say that it's an ugly 5 years-old version! It say to check UBUNTU method for "stable version" (it is not stable, it is "ugly version")...Them, after disaster, the Pandoc's Linux installaing page finally says:
To get the latest release, we provide a binary package for amd64 architecture on the download page.
So, the full instruction is:
Purge apt installed, you must "undo" the bad instruction. apt purge pandoc
Get fresh .deb at Pandoc's git/releases. Example: wget https://github.com/jgm/pandoc/releases/download/2.9.2.1/pandoc-2.9.2.1-1-amd64.deb
Install. Example: sudo dpkg -i pandoc-2.9.2.1-1-amd64.deb

Related

dpkg: why does instdir need admindir parameter on Mint 21

We create a Debian package of our application using CPack which can be installed on Linux Mint 19 like this:
$ sudo dpkg -i --instdir=/opt myapp.deb
With Linux Mint 21 the (installed) dependencies are not resolved:
dpkg: dependency problems prevent configuration of myapp:
myapp depends on libsqlite3-0 however:
Package libsqlite3-0 is not installed.
...
After reading the dpkg man page I set the admindir parameter and the installation succeeds:
$ sudo dpkg -i --instdir=/opt --admindir=/var/lib/dpkg/ myapp.deb
If I do not set admindir to /var/lib/dpkg/ then the right environment is not found. Why is that? And why did it work without admindir on Mint 19? Using parameter root does not help because it expects the administrative directory to be a subdirectory of the instdir.
This is a bug, which seems I introduced in dpkg 1.21.0. I'll be preparing a fix and regression tests for dpkg 1.21.10 which should hit Debian unstable in few days I guess. For Mint, which seems to be based on Ubuntu, you'd need to request the Ubuntu people to consider including that fix once it's in Debian unstable, and then the Mint people to do the same. Otherwise you can specify both options as a workaround for now. :/
Please feel free to report this kind of problems upstream in the bug tracking system next time, I just happened to see this by accident today. :)

E: Package 'oracle-java8-installer' has no installation candidate

I tried to install java8 using the following commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
I'm getting an error as follows :
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'oracle-java8-installer' has no installation candidate
when I searched the error, I found out that "WebUpd8" team has officially discontinued there support.
Please help to install oracle java 8. I'm using ubuntu 16.04.
I just went through the same process and I fixed the problem by manually installing java 8 on my ubuntu 18.04 machine. Hopefully my answer will help you.
Download the latest JAVA 8 SE development kit from here: https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
Open your terminal.
Type $mkdir /opt/jdk.
Untar Java in your new folder $tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk.
Set oracle JDK as the default JVM by running those two instructions (or something around that depending on your configuration):
Note: Each bullet point is one single command
update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_<YourVersion>/bin/java 100
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_<YourVersion>/bin/javac 100
You can check the result by running java -version !
Before I started, I went through those steps as well in order to remove completely java from my system: https://askubuntu.com/questions/84483/how-to-completely-uninstall-java#185250
The source I used for the manual installation of JAVA was this article: https://www.digitalocean.com/community/tutorials/how-to-manually-install-oracle-java-on-a-debian-or-ubuntu-vps
Add the following line to /etc/apt/sources.list:
deb https://debian.opennms.org/ stable main
Install GPG key of the repository:
wget -O - http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -
Update the package index:
sudo apt-get update
Install oracle-java8-installer deb package:
sudo apt-get install oracle-java8-installer
Source
I was facing the same issue and resolved with this:\
sudo apt install openjdk-8-jdk
Please read the details when we execute the below command:
sudo add-apt-repository ppa:webupd8team/java
The Oracle JDK License has changed for releases starting April 16,
2019.
The new Oracle Technology Network License Agreement for Oracle Java SE
is substantially different from prior Oracle JDK licenses. The new
license permits certain uses, such as personal use and development
use, at no cost -- but other uses authorized under prior Oracle JDK
licenses may no longer be available. Please review the terms carefully
before downloading and using this product. An FAQ is available here:
https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html
Oracle Java downloads now require logging in to an Oracle account to
download Java updates, like the latest Oracle Java 8u211 / Java SE
8u212. Because of this I cannot update the PPA with the latest Java
(and the old links were broken by Oracle).
For this reason, THIS PPA IS DISCONTINUED (unless I find some way around this limitation).
This PPA works (Ubuntu 16.04)
sudo add-apt-repository ppa:ts.sch.gr/ppa
sudo apt-get update
sudo apt-get install oracle-java8-installer

Cannot update kernel-devel in CentOS 6.5

First of all I want to note that I am booting CentOS from a flash drive (if it matters).
Now I am trying to install Nvidia drivers for my GPU but the problem is that I must update kernel-devel first. I did the following:
yum update
yum install kernel-devel kernel-headers gcc make
yum -y upgrade kernel kernel-devel
After that I checked which kernel I am using:
uname -r
Which gave me this: 2.6.32-431.el6.x86_64
Then I did: rpm -q kernel-devel , with the following result: kernel-devel-2.6.32-504.el6.x86_64
I tried to upgrade again, but it said "No Packages marked for Update
"
When I tried to install the kernel again, it said that I already have installed the latest version:
Package kernel-devel-2.6.32-504.el6.x86_64 already installed and latest version
Package kernel-headers-2.6.32-504.el6.x86_64 already installed and latest version
Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Nothing to do
I am confused and I don't know how to make the lates kernel active, so I can install my Nvidia drivers.
Usually which kernel to use is selected via grub at boot time. If you have both installed its most likely that grub is still starting the older kernel.
You can look at /etc/grub.conf to make sure "default" is set to what you would expect. Default is 0 keyed off the "Title" entry.
Did you reboot? most of the time the latest kernel is set to default in grub.conf and a reboot is all you need.
Also https://serverfault.com/a/623755 might be the answer.

How to install docker on CentOS 7? [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 25 days ago.
Improve this question
After installing EPEL repository and enabling EPEL, I tried the following:
# yum install docker-io || yum --enablerepo=epel install docker-io
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* epel: mirrors.yun-idc.com
* extras: mirrors.btte.net
* updates: mirrors.btte.net
No package docker-io available.
Error: Nothing to do
In CentOS 7, how can I install docker?
As described here, docker is inside the CentOS-Extras repository of CentOS 7 and can be installed without the need for enabling EPEL.
Please note: As of CentOS 7, the correct name of the package should be simply docker, while in the EPEL repository for CentOS 6, it is yet called docker-io.) I guess that's the problem why it fails for you. Hope this helps!
Some additional comments (thanks to #Martin Preusse for the hints):
The packages in the extras repository are a little bit outdated right now. Available version is 0.11.1, while the current stable version of docker is 1.2.0.
While docker was available in the EPEL repository for CentOS 6 as docker-io (because docker is conflicting with the package name of a system tray dock), it is not available in the beta EPEL repository for CentOS 7. And even worse: The version in the EPEL for CentOS 6 is 1.1.2 and much newer than the current version in the official extras repository of CentOS 7.
It wasn't optimal, but I pulled a recent rpm from FC19 and used that on CentOS7. I used docker-io-1.1.2-3.fc19.x86_64 from:
http://rpm.pbone.net/index.php3/stat/4/idpl/27150558/dir/fedora_19/com/docker-io-1.1.2-3.fc19.x86_64.rpm.html
and then performed a local rpm install. I have not had any issues. My CentOS version is CentOS Linux release 7.0.1406 (Core)
This wasn't my preferred way of doing this, but it was better than being so far back in terms of versions.
I have tried with below command it is working.
yum install -y docker.x86_64
You can install docker using repo or a package file as below:
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Verify that the fingerprint matches 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35 and accept the GPG key if requested to do so.
For the installation of a particular version you can refer the command below :
yum list docker-ce --showduplicates | sort -r
OR
You can also install it without adding the repository on the server.
Installation steps using the package download Visit this link: https://download.docker.com/linux/centos Then select your preferred CentOS version. Once you've found the.rpm file for the Docker version you wish to instal, navigate to x86 64/stable/Packages/.

installing ruby 1.9.3 in michael hartl's ruby on rails tutorial

I'm working on Michael Hartl's ruby on rails tutorial http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-development_tools.
I installed Git, updated my OS to 10.8.2 and downloaded XCode 4.5.2.
when I type in
rvm install 1.9.3
this long thing comes up...
Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.
Notes for Mac OS X 10.8.2, Xcode 4.5.2.
For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/
To use an RVM installed Ruby as default, instead of the system ruby:
rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7
And reopen your terminal windows.
Xcode and gcc:
Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.
Xcode 4.1 and earlier:
- Ruby will build fine.
Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
* Install apple-gcc42 from Homebrew
* Install osx-gcc-installer
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools.
osx-gcc-installer:
If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer.
Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
Press 'q' to continue.
~
(END)
Originally I had to get homebrew and
brew install libksba
but I did that already and it works. That leads to "Xcode and gcc:" and everything below it.
So, I have homebrew, and the following three commands work:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
But when I try
rvm pkg install openssl
this is what happens
Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives
Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log
And this is what happens when I try what it says...
Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm reinstall all --force
Adam-Zerners-MacBook-Pro:~ adamzerner$
some other information...
I don't see a .rvm folder under adamzerner, so I can't read what it tells me to (not that I would understand what I'd be reading anyway).
It seems that I have 1.8.7 installed:
Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
So... to summarize... when I try to run
rvm install 1.9.3
I get the gcc/Xcode problem. To fix that it says to download apple-gcc42 from Homebrew. When I do that, I get a problem after doing
rvm pkg install openssl
The problem being that I need to reinstall all rubies. When I do that:
rvm reinstall all --force
it seems that nothing happens.
Thanks in advance to anyone willing to help me with this problem!
EDIT: I forgot to say this before. For the "long thing" up above, when I press q to continue, this is what happens...
Searching for binary rubies, this might take some time.
https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p327.tar.bz2 - #configure
ruby-1.9.3-p327 - #download
ruby-1.9.3-p327 - #extract
ruby-1.9.3-p327 - #validate
Libraries missing for ruby-1.9.3-p327: env. Refer to your system manual for installing libraries
Mounting remote ruby failed, trying to compile.
Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives
Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running 'make', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327 (already extracted)
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
EDIT: What happens when I follow the github link OliverAtkinson posted
Last login: Wed Dec 26 15:55:12 on ttys000
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew update
Updated Homebrew from 751a0d6e to c67c126c.
==> New Formulae
ume
==> Updated Formulae
akka global markdown ruby slrn
basex gnuplot mu ruby-build ttytter
casperjs gradle qt shiboken vice
cassandra groonga qt5 shocco wine
discount jenkins rakudo-star signing-party xvid
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew tap homebrew/dupes
Error: Already tapped!
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew install autoconf automake apple-gcc42
Error: autoconf-2.69 already installed
Error: automake-1.12.6 already installed
Error: apple-gcc42-4.2.1-5666.3 already installed
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew remove autoconf automake apple-gcc42
Uninstalling /usr/local/Cellar/autoconf/2.69...
Uninstalling /usr/local/Cellar/automake/1.12.6...
Uninstalling /usr/local/Cellar/apple-gcc42/4.2.1-5666.3...
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew install autoconf automake apple-gcc42
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
Already downloaded: /Library/Caches/Homebrew/autoconf-2.69.tar.gz
==> Patching
patching file bin/autoreconf.in
==> ./configure --prefix=/usr/local/Cellar/autoconf/2.69
==> make install
/usr/local/Cellar/autoconf/2.69: 69 files, 2.0M, built in 13 seconds
==> Downloading http://ftpmirror.gnu.org/automake/automake-1.12.6.tar.gz
Already downloaded: /Library/Caches/Homebrew/automake-1.12.6.tar.gz
==> ./configure --prefix=/usr/local/Cellar/automake/1.12.6
==> make install
/usr/local/Cellar/automake/1.12.6: 130 files, 2.1M, built in 16 seconds
==> Downloading http://r.research.att.com/tools/gcc-42-5666.3-darwin11.pkg
Already downloaded: /Library/Caches/Homebrew/apple-gcc42-4.2.1-5666.3.pkg
==> Caveats
NOTE:
This formula provides components that were removed from XCode in the 4.2
release. There is no reason to install this formula if you are using a
version of XCode prior to 4.2.
This formula contains compilers built from Apple's GCC sources, build
5666.3, available from:
http://opensource.apple.com/tarballs/gcc
All compilers have a `-4.2` suffix. A GFortran compiler is also included.
==> Summary
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 5 seconds
Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives
Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log
Adam-Zerners-MacBook-Pro:~ adamzerner$ CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.9.3 --patch falcon --force-autoconf -j 3
Removing /Users/adamzerner/.rvm/src/ruby-1.9.3-p327...
/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 has already been removed.
Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives
Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running 'make -j3', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327
Applying patch /Users/adamzerner/.rvm/patches/ruby/1.9.3/p327/falcon.diff
ruby-1.9.3-p327 - #autoreconf-f
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Adam-Zerners-MacBook-Pro:~ adamzerner$
I've successfully downloaded Ruby 1.9.3 now!
I think the problem was that I hadn't downloaded Command Line Tools from XCode. See http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
note that for whoami, it's using the backtick key, which is right above the tab key. It is NOT using quotes.
After I downloaded Command Line Tools, I then typed in rvm install 1.9.3. I got the same "long thing" as before, but at that point I had everything I needed, so I just pressed q to continue, and ruby 1.9.3 was successfully installed!
note: although it was successfully installed, when I typed ruby -v, it still said it was 1.8.7 even though it wasn't. However, after closing and reopening the terminal, it then said that the version was indeed 1.9.3.