How to install Neovim on a remote server as a non-sudoer? - linux

If I am not a sudoer of a remote server, I am wondering whether it is possible for me to install Neovim. Here is the server release:
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
NAME="Ubuntu"
VERSION="14.04.4 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.4 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

This might be an overkill if you just wish to install a single programm, but you can use Junest to install most command line software without root. It uses an Arch-based Linux distribution inside your home folder.
Another way would be to build Neovim from source and set the prefix to a folder you have write access (Neovim wiki). But this would require your remote server to have all dependencies + CMake installed.

Related

Docker container not mounting volume properly

I have the following directory:
.
└── wordpress
└── important-file.txt
1 directory, 1 files
My problem is that when I run the command below on my local WSL / Ubuntu:
$ docker run -it --rm -v "$(pwd)"/wordpress:/var/www/html php:7.3-fpm-alpine /bin/sh
I was expecting to find file: important-file.txt inside directory: /var/www/html, but the directory was empty.
I tried this on two different local computers and the result was the same. So, if you try it, probably you will get the same result.
In the other hand, if I run the same command on a Digital Ocean droplet the file is there.
Local WSL / Ubuntu system:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
Digital Ocean droplet
# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
The file sharing of my Docker Desktop looks like:
Any idea on why I don't get that file on my local WSL / Ubuntu system?
I found the solution here:
https://github.com/docker/for-win/issues/3385#issuecomment-533279510
Specifically what I did was:
Give: docker-users full control over the directory I want to mount:
On the Windows console, run the command:
> icacls wordpress /q /c /t /grant docker-users:F
Restart the service: LxssManager:
Close and ReOpen the WSL / Ubuntu.
Try again:
That did the trick.

How to upgrade GitLab CE from Ubuntu 16.04 to Ubuntu 18.04?

Can someone explain me how I can upgrade a running gitlab CE on Ubuntu 16.04 to Ubuntu 18.04?
I could not find any relevant documentation for this upgrade path
It is clear to upgrade ubuntu with
sudo apt update
sudo apt upgrade
sudo do-release-upgrade
But what is needed to tell rerun the setup/upgrade on gitlab?
If you upgrade your Ubuntu Version from 16.04 to 18.04, you also need to alter the repository path for debian packages provided by GitLab Inc.
If you inspect the installation/configuration script available on GitLab.com, you will see that there should be a file in /etc/apt/sources.list.d/ which contains gitlab in its filename.
Simply replace its content with the following lines:
deb https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/ bionic main
deb-src https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/ bionic main
You are now able to upgrade GitLab using the new package repository for your upgraded Ubuntu System:
sudo apt update
sudo apt upgrade
If you mean update Ubuntu from 16.04 to 18.04 then here's the steps:
I did that a couple of days ago.
lsb_release -a # This is just to check the. Ubuntu version
sudo apt update
sudo apt upgrade
This will make sure that you have all the packages updated. The upgrade will not start if you don't have them upgraded.
Then for the actual upgrade
sudo do-release-upgrade
NOTE
1 - The above command might fail because "you have to upgrade all the packages before" please inspect the output of sudo apt upgrade maybe you have a dependency issue & not all the packages are upgraded
2- Please make sure you have all your data backed up before doing the upgrade. I'm assuming that you doing the upgrade via SSH which may be troublesome.
For me, the upgrade got stuck while trying to update the openSSH config files. What I did is that I closed the current SSH session ( tmux ) opened a new session & rebooted the server.
After the server is rebooted
lsb_release -a
Should show
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

i installed ubuntu for chromeos but it did not come with apt-get.

i installed ubuntu for chromeos but it did not come with apt-get.
I am using chromeos.
Uname -a output is armv71.
I installed ubuntu 14.04.
sudo enter-chroot
must access proper file location
clearly dont understand file architecture must work on
https://github.com/dnschneid/crouton/issues/1533

Trying to run PhantomJS on OpenShift: cannot patch GhostDriver so that it can bind on the server IP address

tl;dr
How to solve version 'GLIBCXX_3.4.15' not found when I cannot be root on the Linux server?
I'm tring to use PhantomJS on OpenShift. As explained in this article, PhantomJS GhostDriver binds on localhost only, while on OpenShift, you cannot bind anything on localhost (you need to specify the machine IP address). Paolo Bernardi (the author of the article) shares a patch that fixes PhantomJS, so that it's possible to bind on an IP address.
The problem is that the provided patch does not work on my OpenShift server: when running ./phantomjs -v on my patched PhantomJS installation, I catch a segmentation fault. So I decided to compile PhantomJS with the fix by myself on a Debian server I have, thanks to PhantomJS documentation:
sudo apt-get install build-essential g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev python ttf-mscorefonts-installer
git clone git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 1.9
# apply the fix
./build.sh
When running ./phantomjs -v on the compiled binary, I get 1.9.8: it worked.
When copying this binary on OpenShift and running ./phantomjs -v, I catch an error:
./phantomjs: /usr/lib64/libstdc++.so.6: version 'GLIBCXX_3.4.15' not found (required by ./phantomjs)
Any idea how to solve this? What's the reason of this error? Please excuse my lack of system knownledge :)
Update (and solution):
Thanks to moleculartear, I compiled a patched binary on an RHEL OS: no error anymore!
The working PhantomJS binary: https://github.com/jrestful/server/blob/master/seo/phantomjs-1.9.8-patched.tar.gz?raw=true
More details:
I cannot update GLIBC version on OpenShift since I cannot be root (unless there are some workarounds).
I cannot compile PhantomJS on OpenShift directly since I don't have enough space for the sources on that server.
My OpenShift cartridges: Tomcat 7 (JBoss EWS 2.0) + MongoDB 2.4 + RockMongo 1.1.
On my Debian server:
$ uname -a
Linux servername 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux
$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
On my OpenShift server:
$ uname -a
Linux servername 2.6.32-504.3.3.el6.x86_64 #1 SMP Fri Dec 12 16:05:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
$ strings /usr/lib/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBC_2.0
GLIBC_2.3
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.3.2
GLIBC_2.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH
Since OpenShift Online runs on RHEL, you should be able to install CentOS into a VM on your local machine (or run one in the cloud somewhere) and compile a version of PhantomJS with the patch and then upload it to your OpenShift server and use it.
If you can't do that please use the contact us form at help.openshift.com and reference this stackoverflow question.

Installing files in Ubuntu

I need to download the NVIDIA CUDA tool kit. I am running on Ubuntu server, I don't know which one to download. I checked the ubuntu version, below is the output.
root#ubuserver3:/home/admin# uname -m && cat /etc/*release
i686
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"
NAME="Ubuntu"
VERSION="12.04.4 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.4 LTS)"
VERSION_ID="12.04"
The download link is this - https://developer.nvidia.com/cuda-downloads
Which one should I download? There are 2 files .run and .deb under 32 bit of Ubuntu 12.04. I have no idea.
They are both work, but there is a little difference.
For the deb package, you can use
$ sudo dpkg -i cuda_deb_file.deb
the .run package, just
$ chmod +x cuda_run_file.run
$ ./cuda_run_file.run
The first one install the file to /usr/bin/ /usr/include/ /usr/lib/, but
the second one need you specify the path before installation.

Resources