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

Client keeps trying to reinstall when run on Raspberry Pi running Raspbian #2673

Closed
mitchellrj opened this issue Mar 16, 2016 · 9 comments

Comments

Projects
None yet
8 participants
@mitchellrj
Copy link

commented Mar 16, 2016

I am creating this issue as a record for others to find.

After first time installation, the client runs and after the line Illegal instruction is printed, begins recreating the virtual environment and reinstalling Python packages every time it is run.

This is caused by the version of libaugeas provided by Raspbian repositories not supporting the ARMv6 architecture. To confirm this::

$ sudo apt-get install python-augeas
$ python
...
>>> import augeas
Illegal instruction
$

To work around this, you must remove libaugeas and replace it with one built from source::

sudo apt-get remove libaugeas0 augeas-tools libaugeas-dev
sudo apt-get install libreadline6-dev
wget http://download.augeas.net/augeas-1.4.0.tar.gz
tar -zxf augeas-1.4.0.tar.gz
cd augeas-1.4.0
CFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard' CPPFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard' ./configure
CFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard' CPPFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard' make
sudo make install

Then retry letsencrypt.

Note that this approach installs an unmanaged version of libaugeas and future updates including security fixes will not be automatically provided as part of your normal system update procedure.

@mitchellrj mitchellrj closed this Mar 16, 2016

@lordofthemoon

This comment has been minimized.

Copy link

commented Aug 27, 2016

I tried this on my RPi but although it succeeded (using augeas-1.6.0, not augeas-1.4.0), when I re-ran certbot-auto, I got this:

raj@brin ~/bin $ ./certbot-auto --apache
Requesting root privileges to run certbot...
  /home/raj/.local/share/letsencrypt/bin/letsencrypt --apache
An unexpected error occurred:
OSError: libaugeas.so.0: cannot open shared object file: No such file or directory
Please see the logfiles in /var/log/letsencrypt for more details.

And in the logfile, I see this:

2016-08-27 15:33:16,765:DEBUG:certbot.main:Root logging level set at 30
2016-08-27 15:33:16,768:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2016-08-27 15:33:16,770:DEBUG:certbot.main:certbot version: 0.8.1
2016-08-27 15:33:16,772:DEBUG:certbot.main:Arguments: ['--apache']
2016-08-27 15:33:16,775:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)
2016-08-27 15:33:16,825:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache
2016-08-27 15:33:18,055:DEBUG:certbot.main:Exiting abnormally:
Traceback (most recent call last):
  File "/home/raj/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module>
    sys.exit(main())
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/main.py", line 744, in main
    return config.func(config, plugins)
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/main.py", line 494, in run
    installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/selection.py", line 184, in choose_configurator_plugins
    authenticator = installer = pick_configurator(config, req_inst, plugins)
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/selection.py", line 24, in pick_configurator
    (interfaces.IAuthenticator, interfaces.IInstaller))
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/selection.py", line 76, in pick_plugin
    verified.prepare()
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 219, in prepare
    return [plugin_ep.prepare() for plugin_ep in self._plugins.itervalues()]
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 105, in prepare
    self._initialized.prepare()
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_apache/configurator.py", line 155, in prepare
    self.init_augeas()
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_apache/augeas_configurator.py", line 44, in init_augeas
    import augeas
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/augeas.py", line 78, in <module>
    class Augeas(object):
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/augeas.py", line 82, in Augeas
    _libaugeas = _dlopen("augeas")
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/augeas.py", line 73, in _dlopen
    lib  = reduce(lambda x, y: x or ctypes.cdll.LoadLibrary(y), libs, None)
  File "/home/raj/.local/share/letsencrypt/local/lib/python2.7/site-packages/augeas.py", line 73, in <lambda>
    lib  = reduce(lambda x, y: x or ctypes.cdll.LoadLibrary(y), libs, None)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libaugeas.so.0: cannot open shared object file: No such file or directory

But libaugeas.so.0 does exist in /usr/local/lib. Any suggestions?

@lordofthemoon

This comment has been minimized.

Copy link

commented Aug 27, 2016

I figured this out - I needed to delete the Python virtual environment that had been created in $HOME/.local beforehand and let certbot recreate it (and allow it to reinstall libaugeas as well while doing so, oddly).

@eugenio

This comment has been minimized.

Copy link

commented Nov 27, 2016

Issue is still present in debian jessie armv7l.
I tried both augias 1.6.0 and 1.7.0 with same results. keeps saying "illegal instruction" after attempting secure connection.

@Katkoac

This comment has been minimized.

Copy link

commented Feb 1, 2017

I am getting the "Illegal Instruction" error when trying to get a certificate from Letsencrypt via the up-to-date certbot client from the Raspbian Jessie Repos. I am commenting here as this report is referenced at several different places regarding the problem.

I do not understand this part of the original bug report:

This is caused by the version of libaugeas provided by Raspbian repositories not supporting the ARMv6 architecture.

Isn't this what Raspbian is about, that everything is compiled for armv6 (to be backwards compatible for e.g. "old" RPIs) (sorry if this is a dumb question)?

I ran the following command which I found referenced in some other context else and which I have no experience with, so I might misread the output:

readelf -a /usr/lib/arm-linux-gnueabihf/libaugeas.so.0.18.0 
...
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "6"       <----
  Tag_CPU_arch: v6        <----
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_FP_arch: VFPv2
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  Tag_CPU_unaligned_access: v6

So... doesn't this mean that this is indeed a bug in the certbot framework and thus the initial report should not have been closed?

Any insights or hints are highly appreciated...

@Katkoac

This comment has been minimized.

Copy link

commented Feb 2, 2017

By the way, for completeness, I finally found the solution for the "Illegal Instruction" error when executing certbot: I de-installed certbot with all its dependencies, activated the Raspbian testing repository via /etc/apt/sources.list, then re-installed certbot + all necessary dependencies (mostly Python stuff) via apt-get install, thus pulling all required packages from Raspbian Testing, and voila, no "Illegal Instruction" any more...

@black-snow

This comment has been minimized.

Copy link

commented Feb 18, 2017

How come this issue is closed when it's actually not fixed (yet)? @mitchellrj
@lordofthemoon can you provide a step by step manual?

@FrancYescO

This comment has been minimized.

Copy link

commented Mar 13, 2017

so basically if you want certbot on raspberry

  1. deinstall all previous broken package/dependecies
  2. add deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi to /etc/apt/sources.list
  3. apt-get update
  4. apt-get install certbot
@ragebflame

This comment has been minimized.

Copy link

commented Mar 21, 2017

Thanks @FrancYescO

Your steps allowed me to successfully install certbot on my Pi.

@xlcnd

This comment has been minimized.

Copy link

commented Mar 21, 2017

Thanks @FrancYescO.

And by the way, the certbot-auto script, for two times, messed my python installation! But after following @FrancYescO instructions, I have certbot now running on my raspberry pi 1B+ (jessie).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.