compose: Cannot open self /usr/bin/docker-compose or archive /usr/bin/docker-compose.pkg
I installed docker-compose
on my server I reconnect later it said :
Cannot open self /usr/bin/docker-compose or archive /usr/bin/docker-compose.pkg
I have to reinstall it all the time đ
Thanks for your help!
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 22
- Comments: 67
Commits related to this issue
- Fixes #1135 - Use a new version of pyinstaller 3.2 to build a valid ELF file to stop prelinking breaking compose — committed to garthy/compose by garthy 8 years ago
- Fixes #1135 - Use a new version of pyinstaller 3.2 to build a valid ELF file to stop prelinking breaking compose Signed-off-by: Garth Bushell <garth@garthy.com> — committed to garthy/compose by garthy 8 years ago
I had same problem, it was because of permissions. This helped:
sudo chmod a+rx /usr/local/bin/docker-compose
Docker-compose requires not only
x
permission, but alsor
permission, so as @hajaalin pointed outsudo chmod +rx /usr/local/bin/docker-compose
solves the issue. (Issue can be closed)same problem but I could not find a certain useful answer to solve it
#docker-compose Cannot open self /usr/local/bin/docker-compose or archive /usr/local/bin/docker-compose.pkg
yeah, i have solved this problem now! you can do like this.
do not use the command line
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-uname -s-uname -m > /usr/local/bin/docker-compose
to download, maybe this makes it too slow to download.choose the way of downloading the file , visit this https://github.com/docker/compose/releases website and choose file to download docker-compose-Linux-x86_64 7.67 MB docker-compose-Windows-x86_64.exe 5.97 MB then rename as docker-compose and copy into /usr/local/bin/
thatâs OK.
now you can use docker-compose --version to test whether your docker-compose is installed
Same problem, reason is curl download was incomplete. And no error output!!!
sudo curl -v -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
adding the -v option is the key!Possibly incomplete download or corrupt binary. I reinstalled and everything worked fine.
This is due to prelinking stripping of the zip file appended to the end of the file.
To reproduce run prelink on docker-compose.
This is done daily on OEL6 in /etc/cron.daily/prelink
The fix for this is to get pyinstaller to put the data in a elf section so it doesnât get thrown away
or disable prelinking of docker-compose
Thank you. It works.
This is still broken on Ubuntu 16.04.
Installing with
sudo pip install docker-compose
works.Maybe you should drop the curl installation and require pip. Alternatively, advise to use pip as the preferred method and move curl to the alternative installation methods, with a link to this issue. Both solutions are going to save time to many people.
Just in case it would need a writable /usr/local/bin similarly to what you suggest to do to make the download easier, thatâs against any security guideline. I didnât even attempt it.
Well, I had the same issue on an other executable built with pyinstaller. I managed to solve it by blacklisting the binarie from prelink: add
/etc/prelink.d/docker-compose
:To be sure it works call
prelink --all
I fixed it.
It is because my desk is full, so I deleted all of images and containers by:
sudo curl -L âhttps://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)â -o /usr/local/bin/docker-compose
It solves the problem for me.
This problem was solved, I did nothing but download the âdocker-compose-Linux-x86_64â file again. The network sucks!
Ran into this while packaging
docker-compose-1.5.2
as an RPM for CentOS 6. Turns out therpmbuild
command has a default strip step at__os_install_post
. I âfixedâ it by adding this line at the top of my RPM spec:You can find a little more info on RPM stripping - and other ways to disable it - at http://livecipher.blogspot.com/2012/06/disable-binary-stripping-in-rpmbuild.html
The curl instructions are for the pyinstaller version.
It sounds like the download was incomplete, since the file size is wrong?