Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCE Error Creating Virual Environment - Cannot locate wrapped file #2554

Closed
jknopp opened this issue Feb 25, 2016 · 14 comments
Closed

GCE Error Creating Virual Environment - Cannot locate wrapped file #2554

jknopp opened this issue Feb 25, 2016 · 14 comments

Comments

@jknopp
Copy link

jknopp commented Feb 25, 2016

I am running into an issue with executing 'letsencrypt-auto' on the GCE Bitnami Ghost image.
The issue can be reproduced using the base installer below:
https://cloud.google.com/launcher/solution/bitnami-launchpad/ghost

Here is the command I use, and it's output:

sudo wget https://github.com/letsencrypt/letsencrypt/archive/master.zip
sudo unzip master.zip
cd letsencrypt
sudo /opt/bitnami/ctlscript.sh stop
sudo ./letsencrypt-auto --debug

..install dependencies...

**Reading package lists... Done **
Reading package lists... Done
**Building dependency tree **
Reading state information... Done
ca-certificates is already the newest version.
dialog is already the newest version.
gcc is already the newest version.
libffi-dev is already the newest version.
python is already the newest version.
python-dev is already the newest version.
python-virtualenv is already the newest version.
libssl-dev is already the newest version.
augeas-lenses is already the newest version.
libaugeas0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Checking for new version...
Creating virtual environment...
Cannot locate wrapped file

Dependencies were all installed without issue. I have tried from both the 'home' directory and the root of the drive.

I have also tried:

./letsencrypt-auto --apache -d {domain}
./letsencrypt-auto certonly -w /home/bitnami/htdocs -d {domain}

Any ideas what could be causing the wrapped file issue?

@jknopp jknopp changed the title GCE Error - Cannot locate wrapped file GCE Error Creating Virual Environment - Cannot locate wrapped file Feb 25, 2016
@pde
Copy link
Member

pde commented Feb 26, 2016

Run with -v for more debugging output?

@pde
Copy link
Member

pde commented Feb 26, 2016

Also what is the underlying host operating system? We might have packages for it...

@pde
Copy link
Member

pde commented Feb 26, 2016

BTW you now get the latest letsencrypt auto by just doing:

wget https://raw.githubusercontent.com/letsencrypt/letsencrypt/master/letsencrypt-auto or
https://raw.githubusercontent.com/letsencrypt/letsencrypt/v0.4.0/letsencrypt-auto

@jknopp
Copy link
Author

jknopp commented Feb 26, 2016

Problem solved. Thanks for the suggestions @pde

The key with on Bitnami seems to be to run the command on the "bitnami console"
More info about this here: https://wiki.bitnami.com/Components/BitNami_console

@jknopp jknopp closed this as completed Feb 26, 2016
@lapswr
Copy link

lapswr commented Jan 20, 2017

@jknopp how did you do the install can you describe the steps?

@kreig303
Copy link

kreig303 commented Feb 13, 2017

@jknopp @lapswr

Figured out the Bitnami doc, which was mildly obtuse (oh well free image shouldn't complain).

Just need to add "env -i" to the command e.g.
$ sudo env -i ./certbot-auto --apache -d my.domain

@jknopp
Copy link
Author

jknopp commented Feb 15, 2017

@kreig303 @lapswr

Here are the steps I took:

wget https://github.com/letsencrypt/letsencrypt/archive/master.zip
unzip master.zip
rm master.zip
mv letsencrypt-master letsencrypt
cd /opt/bitnami
sudo /opt/bitnami/ctlscript.sh stop
sudo ./use_ghost
bash-4.2# cd /home/<USERNAME>/letsencrypt/
bash-4.2# ./letsencrypt-auto certonly
sudo nano /home/bitnami/apps/ghost/conf/httpd-vhosts.conf
<VirtualHost *:443>
    ServerName ghost.example.com
    ServerAlias www.ghost.example.com
    DocumentRoot "/opt/bitnami/apps/ghost/htdocs"
    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/[CERTNAME]/cert.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/[CERTNAME]/privkey.pem"
    SSLCertificateChainFile "/etc/letsencrypt/live/[CERTNAME]/fullchain.pem"
    Include "/opt/bitnami/apps/ghost/conf/httpd-app.conf"
</VirtualHost>

sudo nano /home/bitnami/stack/apache2/conf/bitnami/bitnami.conf

<VirtualHost _default_:443>
  DocumentRoot "/opt/bitnami/apache2/htdocs"
  SSLEngine on
  SSLCertificateFile "/etc/letsencrypt/live/[CERTNAME]/cert.pem"
  SSLCertificateKeyFile "/etc/letsencrypt/live/[CERTNAME]/privkey.pem"
  SSLCertificateChainFile "/etc/letsencrypt/live/[CERTNAME]/fullchain.pem"
  [...]
</VirtualHost>

sudo /opt/bitnami/ctlscript.sh start

@minhchu
Copy link

minhchu commented Feb 18, 2017

@jknopp thanks. your solution works for me.
a small note: I used standalone option.

@imiRemy
Copy link

imiRemy commented Mar 10, 2017

@jknopp thank you! Your solution also worked for me using the standalone option that @minhchu used. I have a bitnami image running apache on AWS and the out-of-the-box certbot setup did not work.

@ghost
Copy link

ghost commented Mar 22, 2017

@jknopp Help! Followed your example, and ended up with this:

Creating virtual environment...
Installing Python packages...
Traceback (most recent call last):
  File "/tmp/tmp.DJk8tZXSnw/pipstrap.py", line 146, in <module>
    exit(main())
  File "/tmp/tmp.DJk8tZXSnw/pipstrap.py", line 133, in main
    shell=True)
  File "/opt/bitnami/python/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'pip install --no-index --no-deps -U /tmp/pipstrap-jxsE8o/pip-8.0.3.tar.gz /tmp/pipstrap-jxsE8o/setuptools-20.2.2.tar.gz /tmp/pipstrap-jxsE8o/wheel-0.29.0.tar.gz' returned non-zero exit status 1

@rickitan
Copy link

Hi @itdansharpe, I'm getting the same error. But I run the command with as sudo, I get the same error that @jknopp was getting ("Cannot locate wrapped file"). By any chance did you find a solution?

@fabLouis
Copy link

fabLouis commented Mar 29, 2017

This post unblocks me, specially the edition of 'letsencrypt-auto' script.
After that, no need to use 'sudo' because the Bitnami env is loaded as root.

@ghost
Copy link

ghost commented Mar 29, 2017

And that worked for you?

Stop all the services: sudo /opt/bitnami/ctlscript.sh stop
Load the Mean console: sudo /opt/bitnami/use_gitlab
Download pip from: sudo wget https://bootstrap.pypa.io/get-pip.py
Install it executing: sudo python get-pip.py
Open the installation script (letsencrypt-auto)with your favourite CLI editor and edit the following line:

  • PIP_OUT="$VENV_BIN/pip" install --no-cache-dir --require-hashes -r "$TEMP_DIR/letsencrypt-auto-requirements.txt" 2>&1
  • PIP_OUT=pip install --no-cache-dir --require-hashes -r "$TEMP_DIR/letsencrypt-auto-requirements.txt"
    Install Let's Encrypt: sudo ./letsencrypt-auto
    Start all services: sudo /opt/bitnami/ctlscript.sh start

@fabLouis
Copy link

No sorry, just one step more, now I have got this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants