Install coreutils in microsoft hosted azure devops agents - azure-devops

Is there a way to install coreutils in Microsoft hosted azure devops ubuntu-16.04 or 18.04 agents.
Basically we need to run md5sum command as part of our build process.
Apt-Get Install -y coreutils gives the following error: apt-get: command not found

Since you are on hosted agent, unlike you used to do on Linux. Please give a try with below command
sudo apt-get -y install coreutils
Password-less sudo is documented here.
Run as an administrator on Windows and a passwordless sudo user on
Linux
If above way is still not working, suggest you use self-hosted agent as a workaround.

Related

How do you specify the version of azure-functions-core-tools?

I have an AzureDevOps pipeline which was running fine a few weeks ago. When I tried to run it again, I got an error which apparently is caused by running the latest azure-functions-core-tools. It was suggested to downgrade it but I couldn't find how to do it on Azure CLI.
I tried adding the version to the code below but it didn't work.
sudo apt-get install azure-functions-core-tools=(version I want to use)
Firstly use apt-cache showpkg <package-name> to list available versions.
Then use sudo aptitude install <azure-functions-core-tools>=<version> to install the version.

Enabling component manager in gcloud CLI

I made a fresh install of gcloud for ubuntu as instructed here. I want to use the additional components offered by gcloud like kubectl and docker.
So, when I tried typing gcloud components install kubectl, I get an error saying that The component manager is disabled for this installation. Here is the full error message:
This is because you installed google-cloud-sdk with a package manager like apt-get or yum.
kubectl:
If you look here you can see how to install additional components. Basically sudo apt-get install kubectl.
If by docker you mean the docker-credential-gcr then I don't know if there's a way to install using a package manager, can't seem to find it. Perhaps ou can try the github repo. Mind you, you don't need this for commands like gcloud docker -- push gcr.io/your-project/your-image:version.
If you mean actual docker for building images and running them locally, that's standalone software which you need to install separately, instructions here.
Alternatively, you can uninstall google-cloud-sdk with apt-get and then reinstall with interactive installer, which will support the suggested gcloud components install *

Cf application in Bluemix - install dependency package

I have a Spring Boot application deployed as a Cloud Foundry app on Bluemix. Unfortunately the core of this app depends on an external program (e.g. abc) which can be easily installed using apt-get install abc on a desktop environment.
Is there any way to install such a dependency in a cloud foundry environment?
Many thanks for your support
Luca
I'm working on a similar challenge with R and am using a soon-to-be-discontinued git repo which uses apt-get options to allow you to redirect your install into folders/directories where you have write authority during the staging process. You'll have to update your paths to ensure that you can access the installed code. The install process is multi-step,
define the alternate path for apt
define the path for your installation
update apt
use apt-get install ... to download the necessary packages and associated dependencies
use dpkg to install the downloaded packages

Installing Cloud Foundry on Ubuntu 16.04

I am trying to install Cloud Foundry on Ubuntu 16.04. Here are my steps:
curl -L "https://cli.run.pivotal.io/stable?release=linux64-binary&source=github" | tar -zx
./cf --version
The result is cf version 6.18.0+b22884b-2016-05-10
I get an error message when I enter cf api https://api.ng.bluemix.net
The program 'cf' is currently not installed. You can install it by typing:
apt install confluence
Am I missing something?
Thanks,
Move the binary you downloaded (./cf) to somewhere on your PATH so you can invoke it just with cf.

Error when creating unaccent extension on PostgreSQL

I am trying to configure PostgreSQL to use fulltext search in my rails app as mentioned in this Railscast.
I am using a fresh Ubuntu 12.04 server running PostgreSQL 9.1.5 installed using apt-get with the ppa:pitti/postgresql with precise.
I get the following error when trying to run the migration and when I try the same command in the psql console with the peer postgres user:
postgres=# CREATE EXTENSION unaccent;
ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/unaccent.control":
No such file or directory
In my local box running Ubuntu 10.04 desktop I use the same repository (natty) and it works well.
Any insights would be greatly appreciated.
You need to install the package postgresql-contrib-9.1 in your system first. (Adapt to your version number! Here is the currently available list of packages.) That's the case under Debian, Ubuntu & friends anyway. Using a system user with the necessary privileges:
apt-get install postgresql-contrib-9.1
If your currently logged in user does not have the necessary privileges (but sudo rights):
sudo apt-get install postgresql-contrib-9.1
Quoting the PostgreSQL Apt Repository:
If the version included in your version of Debian is not the one you
want, you can use the PostgreSQL Apt Repository.
There are basic install instructions on the Postgres website for each available OS.
For accent-insensitive indices using unaccent consider this related question:
Does PostgreSQL support "accent insensitive" collations?
On CentOS:
sudo yum install postgres*contrib