I'm currently working out a Dockerfile. So I am trying to build out a Centos 7.6 base image and I get a failure when I try to use any yum packages. I'm not sure what the cause of this is.
I've already attempted to make the user root to see if that makes a difference but it doesn't help the situation. I've also done a docker pull centos to recieve the latest version of centos.
I simplified the code and still the same error.
FROM centos
ARG MONGO-RAILS-VERSION="0.0"
RUN yum install vim
# curl -L get.rvm.io | bash -s stable \
# rvm install 2.3.1 \
# rvm use 2.3.1 --default \
# gem install rails
I get an error that looks something like this
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was
14: curl#7 - "Failed to connect to 2001:1b48:203::4:10: Network is unreachable"
The command '/bin/sh -c yum install vim' returned a non-zero code: 1
You may want to have a look for Set build-time variables (--build-arg):
$ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567 .
I am writing a Python application. It requires a certain version of Python, and some third party dependencies that are available on PyPI. It also depends on a private Python library that I have in a private Git repository. I'd like to depend on a specific Git tag. I need to be able to spin up this environment both on a local machine (where I have SSH access to the git repository) and on a CI server (where I have HTTPS access to the git repository using a username and password). I'm struggling to set up my Pipfile in a way that will work for both cases.
I tried to specify the URL dependency with the SSH URL and then on the CI machine where I only have HTTPS access, tried to first install the library via https directly into the virtual environment. The trouble is that the entire URL (including the protocol) is stored in the Pipfile.lock (and the entire URL is checked by pip when comparing the existing installation to the new one).
pipenv install the dependency from ssh:
$ pipenv install -e git+ssh://git#git.domain.com/my-private-lib#v0.1#egg=my-private-lib
of course if I try to just sync on the CI machine, it will fail:
$ git clone my-project
$ cd my-project
$ pipenv sync
# Warning: Your dependencies could not be resolved.
trying to install using https before running pipenv:
$ git clone my-project
$ cd my-project
$ virtualenv venv
$ source venv/bin/activate
$ pip install my-private-repo # git+https://my_user:my_token#git.domain.com/my-private-lib#v0.1
$ deactivate
$ pipenv sync
But this still will tell me that it can't reach ssh://git#git.domain...
I appreciate that the point of pipenv is to specify concrete dependencies with concrete sources. In my case, the source is slightly different between two machines. Is there any way around this? Perhaps a way to turn off exact URL checking and just check the git hash?
I have installed 1.6.0_beta3 since my company's app depends on Xcode 8.
When running the bootstrap script as explained I need to enter my github username.
Why? It's a public repository. Nothing happens when I enter my github username.
XXX:WebDriverAgent YYY$ ./Scripts/bootstrap.sh
Fetching dependencies
Username for 'https://github.com': (displayed 3 times)
I also tried with:
./Scripts/bootstrap.sh -d
./Scripts/bootstrap.sh -D
Seems like more things were broken after updating OSX. Thanks Appium.
$ cd /usr/local
$ git reset --hard
$ git clean -df
$ brew update
$ brew upgrade carthage
Trying to update Homebrew with brew update I got the following error
error: The following untracked working tree files would be overwrittenby merge:
Library/Formula/argp-standalone.rb
Library/Formula/cocot.rb
Please move or remove them before you can merge.
Aborting
Updating e088818..5909e2c
Error: Failed while executing git pull origin refs/heads/master:refs/remotes/origin/master
I found a blog post by someone who experienced a similar problem after having installed Mountain Lion (which I did this week too). He explains how he removed the files referred to in the error message
I removed these files:
$ cd $(brew --prefix)
$ rm cocot.rb
However, removing these files didn't help with the brew update. Instead I had to manually update brew through git:
$ cd $(brew --prefix)
$ git fetch origin
$ git reset --hard origin/master
$ brew update
Already up-to-date.
Assuming those instructions are correct (which I maybe shouldn't assume), I tried to follow these instructions and do
$ cd $(brew --prefix)
$ rm cocot.rb
However, it said 'file doesn't exist' when I tried to rm cocot.rb
One thing I'm not sure about is the cd $(brew --prefix) Are those the exact words I type or do I have to replace prefix with something? the cd was successful, so I'm assuming it was correct -- it moved me into /usr/local, but there was no file to remove. Contents of /usr/local are
Cellar clamXav git mysql var Library doc heroku mysql-5.5.15-osx10.6-x86_64 README.md etc include rvm bin foreman lib share
At any rate, do you know how I can fix the 'brew update'
Update: After removing the files according to favoretti's instructions and trying chown -R <your_username> $(brew --prefix)/.git, I got the following error running brew update
error: The following untracked working tree files would be overwritten by merge:
Library/Aliases/gperftools
Library/Aliases/hashdeep
Library/Aliases/htop
Library/Aliases/nodejs
Library/Aliases/ocio
Library/Aliases/oiio
Library/Aliases/pgrep
Library/Aliases/pkill
Library/Aliases/qt4
Library/Aliases/twolame
Library/Aliases/wxwidgets
Library/Contributions/cmds/brew-aspell-dictionaries
Library/Contributions/cmds/brew-beer.rb
Library/Contributions/cmds/brew-dirty.rb
Library/Contributions/cmds/brew-graph
Library/Contributions/cmds/brew-grep
Library/Contributions/cmds/brew-leaves.rb
Library/Contributions/cmds/brew-linkapps.rb
Library/Contributions/cmds/brew-ls-taps.rb
Library/Contributions/cmds/brew-man
Library/Contributions/cmds/brew-md5-to-sha1
Library/Contributions/cmds/brew-mirror-check.rb
Library/Contributions/cmds/brew-pull.rb
Library/Contributions/cmds/brew-readall.rb
Library/Contributions/cmds/brew-server
Library/Contributions/cmds/brew-services.rb
Library/Contributions/cmds/brew-switch.rb
Library/Contributions/cmds/brew-test-bot.rb
Library/Contributions/cmds/brew-tests.rb
Library/Contributions/cmds/brew-unpack.rb
Library/Contributions/cmds/brew-which.rb
Library/Contributions/cmds/git
Library/Contributions/cmds/svn
Library/ENV/4.3/apr-1-config
Library/ENV/4.3/bsdmake
Library/ENV/4.3/c++
Library/ENV/4.3/c89
Library/ENV/4.3/c99
Library/ENV/4.3/cc
Library/ENV/4.3/clang
Library/ENV/4.3/clang++
Library/ENV/4.3/cpp
Library/ENV/4.3/g++
Library/ENV/4.3/gcc
Library/ENV/4.3/git
Library/ENV/4.3/i686-apple-darwin11-llvm-g++-4.2
Library/ENV/4.3/i686-apple-darwin11-llvm-gcc-4.2
Library/ENV/4.3/ld
Library/ENV/4.3/llvm-g++
Library/ENV/4.3/llvm-g++-4.2
Library/ENV/4.3/llvm-gcc
Library/ENV/4.3/llvm-gcc-4.2
Library/ENV/4.3/make
Library/ENV/4.3/mig
Library/ENV/4.3/sed
Library/ENV/4.3/svn
Library/ENV/4.3/xcrun
Library/ENV/libsuperenv.rb
Library/ENV/pkgconfig/leopard/libcrypto.pc
Library/ENV/pkgconfig/leopard/libcurl.pc
Library/ENV/pkgconfig/mountain_lion/libcurl.pc
Library/ENV/pkgconfig/mountain_lion/libexslt.pc
Library/ENV/pkgconfig/mountain_lion/libxml-2.0.pc
Library/ENV/pkgconfig/mountain_lion/libxslt.pc
Library/Formula/abcl.rb
Library/Formula/abcmidi.rb
Library/Formula/aiccu.rb
Library/Formula/akka.rb
Library/Formula/alac.rb
Library/Formula/alure.rb
Library/Formula/appledoc.rb
Library/Formula/arangodb.rb
Library/Formula/argp-standalone.rb
Library/Formula/argtable.rb
Library/Formula/autopano-sift-c.rb
Library/Formula/avian.rb
Library/Formula/avidemux.rb
Library/Formula/avro-cpp.rb
Library/Formula/aws-cloudsearch.rb
Library/Formula/aws-sns-cli.rb
Library/Formula/backupninja.rb
Library/Formula/bact.rb
Library/Formula/bam.rb
Library/Formula/basex.rb
Library/Formula/berkeley-db4.rb
Library/Formula/bind.rb
Library/Formula/blazeblogger.rb
Library/Formula/bochs.rb
Library/Formula/boost149.rb
Library/Formula/bsdconv.rb
Library/Formula/bsdmake.rb
Library/Formula/buildapp.rb
Library/Formula/bup.rb
Library/Formula/byacc.rb
Library/Formula/cadubi.rb
Library/Formula/camellia.rb
Library/Formula/casperjs.rb
Library/Formula/ccextractor.rb
Library/Formula/cconv.rb
Library/Formula/cdo.rb
Library/Formula/cdpr.rb
Library/Formula/cgvg.rb
Library/Formula/checkstyle.rb
Library/Formula/chordii.rb
Library/Formula/chruby.rb
Library/Formula/cifer.rb
Library/Formula/clhep.rb
Library/Formula/cntlm.rb
Library/Formula/cocot.rb
Library/Formula/cogl.rb
Library/Formula/collada-dom.rb
Library/Formula/crash.rb
Library/Formula/crossroads.rb
Library/Formula/crosstool-ng.rb
Library/Formula/css-crush.rb
Library/Formula/csync.rb
Library/Formula/ctemplate.rb
Library/Formula/curlftpfs.rb
Library/Formula/cutter.rb
Library/Formula/cvsutils.rb
Library/Formula/darkstat.rb
Library/Formula/darner.rb
Library/Formula/dart.rb
Library/Formula/dasm.rb
Library/Formula/debianutils.rb
Library/Formula/dfc.rb
Library/Formula/dgtal.rb
Library/Formula/dhcping.rb
Library/Formula/di.rb
Library/Formula/dmtx-utils.rb
Library/Formula/drip.rb
Library/Formula/dsniff.rb
Library/Fo
Aborting
Updating e088818..c1fbc29
Error: Failed while executing git pull origin refs/heads/master:refs/remotes/origin/master
You need to do the following:
cd $(brew --prefix)
rm Library/Formula/argp-standalone.rb
rm Library/Formula/cocot.rb
And then do the
git fetch origin
git reset --hard origin/master
brew update
Basically, to explain a bit more:
cd $(brew --prefix)
tells cd to change the directory to whatever brew --prefix will output.
If you try executing brew --prefix command you should see something in lines of:
brew --prefix
/usr/local
So the command would be in this case an equivalent of cd /usr/local.
Newer brew versions have formulae under its installation prefix and Library/Formula/, so that's where you need to look for those outdated/changed files.
Note, that if you changed those formulae yourself for a particular reason (like pinning a version) this action will revert them back to default ones and may produce unwanted effects.
#TedPennings noted in comments that this worked for him, but his sequence was:
chown everything to my_username:admin, ie, sudo chown -R ted:admin $(brew --prefix)
run the two git commands above,git fetch origin and git reset --hard origin/master
cd $(brew --prefix)
git reset --hard HEAD
brew update
This is caused by an old bug in the update code that has long since been fixed. However, the nature of the bug requires that you do the following:
cd $(brew --repository)
git reset --hard FETCH_HEAD
If brew doctor still complains about uncommitted modifications, also run this command:
cd $(brew --repository)
git clean -fd
$ cd $(brew --prefix)
$ git clean -fd
$ git reset --hard
$ sudo chown -R `whoami` `brew --prefix`
$ brew update
Note: steps 2&3 worked for me since I did step 5 before 4 before I got the error. The brew update before changing the owner of the folder caused the whole problem.
I had a similar issue where my brew package library got downloaded as a root user and then I was not able to run brew update as git would complain about not able to merge the file.
Solution was to do :-
sudo chown -R <user> /usr/local/Library
Resetting the brew repository should be the most efficient way if you don't mind to discard potential modifications on formulas you might have been applied:
$ cd `brew --prefix`
$ git fetch origin
$ git reset --hard origin/master
$ brew cleanup --force
$ brew update
I was able to fix this on my machine by adding admin group write (and setgid bit) permission at these paths:
sudo chmod -R g+ws /usr/local /Library/Caches/Homebrew
The s sets the group id on execution so that the write permissions aren't lost the next time a different admin user updates or upgrades Homebrew.
This answer is somewhat incomplete because when I try to do brew cleanup --force there is a permissions issue when Homebrew tries to remove content in /usr/local/Cellar/. (Unfortunately I'm not able to investigate this further at the moment.)
Another option is to just use git stash.
The brew update command performs a git pull, so if there are any changed files (or even file attributes, which happened to me when I changed permissions in the directory recursively) you have to somehow fix the conflicts. Using git stash is one way; it takes any changes and puts them aside so you effectively revert to the last updated repo version. The Homebrew 'location' is by default /usr/local and it installs as a git repository. You can look for a .git folder to see for yourself. I'm writing a homebrew uninstall script to be posted on my GitHub profile soon with more info.
sudo chown -R USER /usr/local/bin
note - for USER use command whom i.e. your username
sudo brew doctor
This approach may be simpler than some. It involves:
fixing a git issue so you can delegate management of changes to it again.
no manual moves of files or directories.
no manual adjustments of file or directory permissions.
Steps (with notes for those who want explanations):
cd $(brew --repository) // see Note 1 below
git remote add brew https://github.com/Homebrew/brew // see Note 2 below
git pull brew master // promising fast-forward report!
brew update // see Note 3 below
Overview:
From what I can tell, the actual cause of this issue is a change in the repo url. It's now brew and was brew.git. (Full up-to-date url: https://github.com/Homebrew/brew)
Note 1: This first command takes you from anywhere in your file structure to the correct directory. The directory structure is different for me than what others show above (Mac OS 10.11.16), but with this command, those differences should not matter.
Note 2: This second command adds the correct remote url to a new alias; I did so just in case this approach didn't accomplish what I wanted and I needed the previous address again. Since the new remote worked, I'll invite someone else to comment on simply changing the url aliased by origin. I'll happily update the answer to reflect what worked for you.
Note 3: This forth command has exactly the desired result: it reports a large number of updates, including the particularly nice report of "==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew!" (emphasis theirs).
This post helped me after updating to El Capitan. In my case, chown wasn't working ("zsh: command not found: chown"), so step 1 was adding this line to my .zshrc:
export PATH="$PATH:/usr/sbin"
I'd already tried several of the more popular answers above, so I'm pretty sure that git status was coming up clean by the time I pasted in the critical command from the blog post:
sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
This should work.
1. cd `brew --prefix`
2. git fetch origin
3. git reset --hard origin/master
4. sudo brew update
All Rails applications are working just fine until today. I am not sure if someone changes the settings on this machine. However does anyone know what could be the fix for this?
Details:
Centos 5.5
Apache
Passenger
Rails 3.0.x
MySql 5.0.77
Error details:
Okay this saves the day.
wget -O /usr/lib64/libmysqlclient.so.15 http://files.directadmin.com/services/es_5.0_64/libmysqlclient.so.15
chmod 755 /usr/lib64/libmysqlclient.so.15
ldconfig
You can try to find the right package by the following command:
$ sudo yum whatprovides libmysqlclient.so.15
libmysqlclient15-5.0.95-5.w5.i386
libmysqlclient15-devel-5.0.95-5.w5.i386
cpanel-mysql-libs-5.0.96-1.cp1136.i386 : The shared libraries required for MySQL clients
then:
$ sudo yum reinstall WHATEVER_THE_PACKAGE_NAME_IS
You may double check the package name by doing yum search package_name.
If not found, you may try to fix your yum repositories e.g. by configuring Webtatic Yum Repository.
To set up the repository, install the webtatic-release RPM:
Webtatic EL6 for CentOS/RHEL 6:
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Webtatic EL5.1 for CentOS/RHEL 5:
rpm -Uvh http://repo.webtatic.com/yum/el5/latest.rpm
Webtatic 5 for CentOS/RHEL 5:
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
and repeat the search/reinstall process again.
If you're running cPanel, you may try to run the following script:
/scripts/check_cpanel_rpms --fix
If won't help, remove the broken package e.g. rpm -e cpanel-mysql-5.0.96-1.cp1136 and run the check command again.
If still doesn't work, another thing could be to recompile your Apache (only if your LAMP is broken) by:
/scripts/easyapache