Difference between revisions of "2018/04/07"
m (8 revisions imported: moved from HTYP) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{page/date|nav=[[2018/01/15|prev]] .. [[2018/04/07|today]] .. [[2018/04/10|next]] }} | ||
=Take 1= | =Take 1= | ||
Loosely following [https://anystack.xyz/how-to-install-mastodon-ubuntu/ these instructions]... | Loosely following [https://anystack.xyz/how-to-install-mastodon-ubuntu/ these instructions]... |
Latest revision as of 19:07, 20 November 2022
Saturday, April 7, 2018 (#97)
Take 1Loosely following these instructions... I just do everything in root rather than using sudo, because that's how I roll. Things done:
Now, we're trying to enable ident auth in Pg so users can log in without a password.
That didn't work, because after the second line it asked for a password for postgres, which I don't have, and wouldn't accept a blank. So, backing out and trying as root (and all one line):
No error, but also no success message. I will assume successful.
Setting Up Ruby
That didn't work because rbenv was not installed. (Also not sure this is the best version of Ruby, anymore, but that seems fixable later now that we have the command). So I had to back out to root,
Installing Mastodon
Okay, Simon says...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/mastodon/live/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.2/ext/nokogiri /usr/bin/ruby2.3 -r ./siteconf20180407-2653-idvqpi.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /home/mastodon/live/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.2 for inspection. Results logged to /home/mastodon/live/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.8.2/gem_make.out An error occurred while installing nokogiri (1.8.2), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.8.2'` succeeds before bundling. In Gemfile: rails-settings-cached was resolved to 0.6.6, which depends on rails was resolved to 5.1.4, which depends on actioncable was resolved to 5.1.4, which depends on actionpack was resolved to 5.1.4, which depends on actionview was resolved to 5.1.4, which depends on rails-dom-testing was resolved to 2.0.3, which depends on nokogiri Okay, trying that command...
So again, Simon says...
Fetching: mini_portile2-2.3.0.gem (100%) Successfully installed mini_portile2-2.3.0 Fetching: nokogiri-1.8.2.gem (100%) Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.8.2/ext/nokogiri /usr/bin/ruby2.3 -r ./siteconf20180407-2736-1uhzyd6.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.3.0/gems/nokogiri-1.8.2 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.8.2/gem_make.out Okay. Let's start over, and use the official instructions this time, leaving off any bits that have already clearly been done. (I don't know why I didn't use them to begin with... I guess these alternate instructions just looked so distro-specific and friendly.) Take 2As root...
Yarn Repository
User-Specific Stuff
rbenv is a function rbenv () { local command; command="${1:-}"; if [ "$#" -gt 0 ]; then shift; fi; case "$command" in rehash | shell) eval "$(rbenv "sh-$command" "$@")" ;; *) command rbenv "$command" "$@" ;; esac}
Installing MastodonMuch of this has already been done -- but this instruction set does explain it a bit. Skipping redundant bits...
I have to stop for tonight. part 2Looks like Gemfile is an app-config file which needs to already exist when you run Log in as root, then:
Looks like the instructions may not have been updated; Charlotte tells me that Masto does, in fact, now require Ruby 2.5.0. So...
The `bundle' command exists in these Ruby versions: 2.4.1 I'm going on the assumption that this doesn't mean "Ruby did away with Bundler after 2.4.1" but rather "You haven't installed it for 2.5.0, you've only installed it for 2.4.1". We're already in ~/live, which seems to be the right folder, so no need to cd there.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/idn-ruby-0.1.0/ext /home/mastodon/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180409-7030-grmz7k.rb extconf.rb checking for -lidn... no ERROR: could not find idn library! Please install the GNU IDN library or alternatively specify at least one of the following options if the library can only be found in a non-standard location: --with-idn-dir=/path/to/non/standard/location or --with-idn-lib=/path/to/non/standard/location/lib --with-idn-include=/path/to/non/standard/location/include *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/mastodon/.rbenv/versions/2.5.0/bin/$(RUBY_BASE_NAME) --with-idn-dir --without-idn-dir --with-idn-include --without-idn-include=${idn-dir}/include --with-idn-lib --without-idn-lib=${idn-dir}/lib --with-idnlib --without-idnlib To see why this extension failed to compile, please check the mkmf.log which can be found here: /home/mastodon/live/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/idn-ruby-0.1.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/idn-ruby-0.1.0 for inspection. Results logged to /home/mastodon/live/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/idn-ruby-0.1.0/gem_make.out An error occurred while installing idn-ruby (0.1.0), and Bundler cannot continue. Make sure that `gem install idn-ruby -v '0.1.0'` succeeds before bundling. In Gemfile: idn-ruby Get back out to root, then:
Installing idn-ruby 0.1.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/idn-ruby-0.1.0/ext /home/mastodon/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180409-19186-1hcp4ek.rb extconf.rb checking for -lidn... no ERROR: could not find idn library! Please install the GNU IDN library or alternatively specify at least one of the following options if the library can only be found in a non-standard location: --with-idn-dir=/path/to/non/standard/location or --with-idn-lib=/path/to/non/standard/location/lib --with-idn-include=/path/to/non/standard/location/include
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/mastodon/.rbenv/versions/2.5.0/bin/$(RUBY_BASE_NAME) --with-idn-dir --without-idn-dir --with-idn-include --without-idn-include=${idn-dir}/include --with-idn-lib --without-idn-lib=${idn-dir}/lib --with-idnlib --without-idnlib To see why this extension failed to compile, please check the mkmf.log which can be found here: /home/mastodon/live/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/idn-ruby-0.1.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/idn-ruby-0.1.0 for inspection. Results logged to /home/mastodon/live/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/idn-ruby-0.1.0/gem_make.out An error occurred while installing idn-ruby (0.1.0), and Bundler cannot continue. Make sure that `gem install idn-ruby -v '0.1.0'` succeeds before bundling. In Gemfile: idn-ruby Ohhkayy... well... let's try pointing it directly at the idn library file...
part 3Some research by Ben Hamill suggested this: The resulting error message pointed me at a log file, which seemed to be saying that the problem was coming from gcc. Since this means there was compiling involved, I thought maybe I should install the header file for idn as well (as root): Followed by...
Output: Building native extensions. This could take a while... ERROR: Error installing idn: ERROR: Failed to build gem native extension. current directory: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2/ext /home/mastodon/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180409-23716-rrnxuy.rb extconf.rb checking for -lidn... yes checking for idna.h... yes checking for punycode.h... yes checking for stringprep.h... yes creating Makefile current directory: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2/ext make "DESTDIR=" clean current directory: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2/ext make "DESTDIR=" compiling idn.c compiling idna.c idna.c: In function ‘toASCII’: idna.c:88:37: error: ‘struct RString’ has no member named ‘ptr’ rc = idna_to_ascii_8z(RSTRING(str)->ptr, &buf, flags); ^ idna.c: In function ‘toUnicode’: idna.c:128:41: error: ‘struct RString’ has no member named ‘ptr’ rc = idna_to_unicode_8z8z(RSTRING(str)->ptr, &buf, flags); ^ idna.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-tautological-compare’ Makefile:241: recipe for target 'idna.o' failed make: *** [idna.o] Error 1 make failed, exit code 2 Gem files will remain installed in /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2 for inspection. Results logged to /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/idn-0.0.2/gem_make.out Oops, maybe I was supposed to be in Logging in again as root...
Building native extensions. This could take a while... ERROR: Error installing idn: ERROR: Failed to build gem native extension. current directory: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2/ext /home/mastodon/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180409-24783-1trgchl.rb extconf.rb checking for -lidn... yes checking for idna.h... yes checking for punycode.h... yes checking for stringprep.h... yes creating Makefile current directory: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2/ext make "DESTDIR=" clean current directory: /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2/ext make "DESTDIR=" compiling idn.c compiling idna.c idna.c: In function ‘toASCII’: idna.c:88:37: error: ‘struct RString’ has no member named ‘ptr’ rc = idna_to_ascii_8z(RSTRING(str)->ptr, &buf, flags); ^ idna.c: In function ‘toUnicode’: idna.c:128:41: error: ‘struct RString’ has no member named ‘ptr’ rc = idna_to_unicode_8z8z(RSTRING(str)->ptr, &buf, flags); ^ idna.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-tautological-compare’ Makefile:241: recipe for target 'idna.o' failed make: *** [idna.o] Error 1 make failed, exit code 2 Gem files will remain installed in /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/idn-0.0.2 for inspection. Results logged to /home/mastodon/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/idn-0.0.2/gem_make.out Looks pretty much the same. All I can think is that this is some kind of version conflict caused by me originally installing the wrong version of Ruby (because that's the version the instructions specified), so let's scrap this build and start over. |