puppet master fresh installation error - puppet

puppet master was working fine in my ubuntu 12.04 server. Today I uninstalled it using the following commands and made a fresh install again. After a fresh install, puppet master failed to start.
sudo apt-get remove puppetmaster-common
sudo apt-get remove --auto-remove puppetmaster-common
sudo apt-get purge puppetmaster-common
sudo apt-get purge --auto-remove puppetmaster-common
sudo apt-get remove puppet
sudo apt-get remove --auto-remove puppet
sudo apt-get purge puppet
sudo apt-get purge --auto-remove puppet
After a fresh install, it's totally stopped working and I am getting the below errors in log
Could not autoload puppet/type/user: Could not autoload
puppet/provider/user/directoryservice: cannot load such file
Could not autoload puppet/provider/user/directoryservice: cannot load
such file -- plist
Could not autoload puppet/type/user: Could not autoload
puppet/provider/user/directoryservice: cannot load such file
Could not create resources for managing Puppet's files and directories
in sections [:main, :master, :ssl, :metrics]
Could not prepare for execution: Could not create resources for
managing Puppet's files and directories in sections
Also, there is no puppet.conf file exists in /etc/puppet/puppet.conf location even after fresh install. I tried installing twice and I couldn't see this file getting generated.
Puppet version 3.8.5.
Ubuntu : 12.04 version
Could someone help me to resolve this issue?

Matt, I figured it out finally.
I just removed the existing apt repository by manually deleting the entries in
/etc/apt/sources.list.d
and removed puppetlabls-pc1.list, puppet.list, puppet.save, all entries related to puppet and then invoked
sudo apt-get update
And installed puppet master once again without appending any additional apt repos
sudo apt-get -y install puppetmaster
I think I was using wrong apt source. It wasn't generating puppet.conf file at all. May be thats the reason why I was getting weired errors like that

Related

Unable to install libsasl2-devel on Amazon Linux 2 machine

I am running Ansible playbook and trying to install OS dependencies packages for python. I am trying to run the following:
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
However, it fails at installing libsasl2-devel with the message:
"No package matching 'libsasl2-devel' found available, installed or updated"
All my instances are Amazon Linux 2 machines. Is there any alternative package for this? I tried to look into this but I found solutions for Ubuntu only.
I was able to get it to work in a series of steps. Its a yum issue after other databases are installed and not cleaned up before installing mysql
clear sasl first: sudo yum remove cyrus-sasl
if you have installed maria, there will be conflicts, remove that as well
sudo yum remove mariadb mariadb-server mariadb-libs
take note of anything uninstalled by this to re-add later. If this is too much, you can take a risk and not remove sasl, but it might not reset the availability of the package.
Start here to clean up the dependency issues: https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency follow the command given by clean all as sudo rm -rf /var/cache/yum/*
This can possibly resolve your issues right there, if not continue the installation below.
delete all data left in /var/lib/mysql/ or you may have upgrade issues.
resinstall sasl:
sudo yum install cyrus-sasl cyrus-sasl-devel and any other packages removed above.
Establish mysql5.7 with the yum services.
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
sudo yum localinstall -y mysql57-community-release-el6-11.noarch.rpm
sudo yum repolist enabled | grep "mysql.*-community.*"
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-common mysql-community-libs mysql-community-server mysql-community-client
if that doesn't work, re-clear the yum cache again and re-run sudo yum install -y mysql-community-server
if that works, then
sudo service mysqld start
IF the /var/lib/mysql is empty, it will have created a temporary password in the /var/log/mysqld.log (use sudo to read)
run sudo mysql_secure_installation and establish your real password and security settings.
now you should have access via mysql -u root -p

Install gitlab-ce on ubuntu server 17.04

I'm trying to install the gitlab-ce package on a system running Ubuntu server 17.04. I followed the official installation instructions here.
First I ran:
sudo apt-get install curl openssh-server ca-certificates postfix
I already had all of those installed. Then I ran:
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Which also worked fine. But when I try to run
sudo apt-get install gitlab-ce
I get the following error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gitlab-ce
I know it's possible to install gitlab on Ubuntu server 17.04, since I had already done It on a previous installation. Unfortunately I installed the OS again from scratch and I can't remember how I had installed gitlab.
Thanks for any help in advance!
I gave up with the "full" automated script, as it doesn't appear to be working with 17.04... Anyway. I grabbed the latest package from https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb
curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb/download
Installed it with the package manager
sudo dpkg -i gitlab-ce_9.3.0-ce.0_amd64.deb
Then configured it with
sudo gitlab-ctl reconfigure
Then, point your web browser at your new gitlab install and you should be good to go...
Ubuntu 20.04.1
Incase anyone bumps back into this, while trying to gitlab on version 20.0.4 of ubuntu, life is much easier... and the instructions and automated script actually work. GitLab-CE installation instructions
on a fresh install of ubuntu: -
sudo apt install curl
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab- ce/script.deb.sh | sudo bash
sudo apt install gitlab-ce
done!
I was facing the same problem (Lubuntu 17.10), after searching the gitlab forums for 2 Hours, I found this thread.
So from what I have read: Gitlab-ce is not supported for zesty yet. Also the simple
sudo apt-get install gitlab
is a wrong prompt cause it installs a Ubuntu package created by a user named as "praveen" and It is not officially supported by Gitlab.
here is what I did To solve my problem:
sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list.save
sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list
replace "zesty" with "xenial" (These files are root access only)
sudo apt update
sudo apt-get install gitlab-ce
This worked for me.
I have spent my whole afternoon for solving this problem, I hope this solution works for you too.
Prost !
EDIT: corrected spelling
I had the same problem getting the install to run on 17.10. According to an issue on their site ( https://gitlab.com/gitlab-org/gitlab-runner/issues/2851 ), the artful packages are not being built.
I did the same this as #DevX, but just changed the parameters on their setup script.
Howler#GitLab:/tmp$ curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
Howler#GitLab:/tmp$ sudo os=ubuntu dist=xenial bash ./script.deb.sh
Howler#GitLab:/tmp$ sudo apt-get install gitlab-ce

git error: unable to access The requested URL

After re-installing git with the following commands that were advised by someone
sudo apt-get purge runit
sudo apt-get purge git-all
sudo apt-get purge git
sudo apt-get autoremove
sudo apt update
sudo apt-get install git-daemon-sysvinit
sudo apt-get install git-all
sudo apt-get install git-gui
I get the following error when trying to pull or push:
fatal: unable to access [url]. The requested url returned error: 502.
Attempts to re-install git again also failed. It seems that I have removed some package. Any ideas how to fix this?
After a lot of effort, I found that the problem was caused by Firefox proxy settings. Setting a proxy in firefox was creating corresponding variables in /etc/environment which remained even when I chose "no proxy" option in Firefox. Clearing them manually solved the problem.

Uncompleted installation files using apt-get

Often I install softwares/packages using apt-get.
If the installation is stopped or interrupted anyhow,
then how to find and remove the partially installed files? Besides if I install the same package later, will the apt-get installation process create duplicate files?
Try this:
sudo apt-get -f install
And then:
update, upgrade, reinstall, etc...

'No package nginx available' error CentOS 6.5

I'm trying to install nginx on CentOS 6.5, then I added these lines on file /etc/yum.repos.d/nginx.repo
Then install nginx by:
And I've got a message error: No package nginx available
How can I fix it? I would greatly appreciate any help you can give me in working this problem!
nginx is not a part of base CentOS repository.
But you can install EPEL repositiry to get nginx:
yum install epel-release
and then
yum install nginx
This should work well for oraclelinux7
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install nginx
Dockerfile to install nginx on oraclelinux:
FROM oraclelinux:7-slim
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum -y install nginx && yum clean all && rm -rf /var/cache/yum
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]
Your repo url is having an error.
It is necessary to manually replace $releasever with either "5" (for 5.x) or "6" (for 6.x), depending upon your OS version. Similarly you have to edit the $basearch also.
After that do the following command
yum clean all
yum install nginx
An alternative option is to install the epel repository and install nginx from there.
yum install epel-release
yum clean all
yum install nginx
What worked for me (CentOS 7.1) was removing epel first:
yum remove epel-release
yum install epel-release
yum update
yum install nginx
Install nginx first! Run the following commands to first add the EPEL repository (Extra Packages for Enterprise Linux) and then install nginx.
yum install epel-release
yum install nginx
Try to disable plugins for yum:
vim /etc/yum.conf
set plugins=0, and re-install epel-release:
yum remove epel-release
yum install epel-release
yum install nginx
this works for me, good luck!
Check if it is excluded from the yum source:
Use vi /etc/yum.conf
Check the exclude option
Although the otherwise-posted advice regarding manually setting the $releasever and $basearch values in the repo file will not hurt per se (at least while you stick to the software release referred to by the values you set), it is not strictly necessary.
I also have the exact contents you have posted, in a file named /etc/yum.repos.d/nginx.repo which functions correctly without having set the above values explicitly.
My advice would be to perform a yum updateprior to attempting to install (as it's possible that when you tried to install, yum had not queried all of the repo URLs from the files in /etc/yum.repos.d/ for the latest versions of their databases). Also make absolutely sure that your created file ends in .repo as otherwise it will be ignored by yum.
Failing that, check the SElinux security contexts on the files in that directory - or just go ahead and manually restore them by running restorecon -Rv '/etc/yum.repos.d' and check the file permissions on the manually created repo file(s), which should be owned by root:root and have show 644 as file permissions. To manually amend these, run chmod 644 /etc/yum.repos.d/nginx.repoand chown root:root /etc/yum.repos.d/nginx.repo
I hope that some part of the above resolves your issues!
Check yum.conf file and it's exclude key
In addition to all above answers, Make sure nginx, httpd or any other package you want to install is not in the exclude list of yum.conf file.
Open yum.conf file located at /etc/yum.conf
Check the exclude key and remove nginx* if it's there
Then try to install your package. in this case nginx:
sudo yum install nginx

Resources