sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.3k stars 575 forks source link

Install fails in Ubuntu 18 on GitHub #506

Closed stell closed 2 years ago

stell commented 2 years ago

Suddenly this happens:

Run sudo gem install mailcatcher --no-update-sources --no-document
  sudo gem install mailcatcher --no-update-sources --no-document
  mailcatcher
  shell: /bin/bash -e {0}
/usr/lib/ruby/[2](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:2).5.0/rubygems/ext/builder.rb:76: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Building native extensions. This could take a while...
Successfully installed eventmachine-1.0.9.1
Successfully installed mini_mime-1.1.2
Successfully installed mail-2.7.1
Successfully installed rack-1.6.1[3](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:3)
Successfully installed rack-protection-1.5.5
Successfully installed tilt-2.0.10
Successfully installed sinatra-1.4.8
Building native extensions. This could take a while...
ERROR:  Error installing mailcatcher:
    ERROR: Failed to build gem native extension.
    current directory: /var/lib/gems/2.5.0/gems/sqlite3-1.[4](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:4).3/ext/sqlite3
/usr/bin/ruby2.[5](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:6) -r ./siteconf20220[6](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:7)14-2598-1d84jk5.rb extconf.rb
/usr/lib/ruby/2.5.0/mkmf.rb:1553: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040[7](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:8)77
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for -ldl... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for rb_integer_pack()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... yes
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
checking for sqlite3_open_v2()... yes
checking for sqlite3_prepare_v2()... yes
checking for sqlite3_int64 in sqlite3.h... yes
checking for sqlite3_uint64 in sqlite3.h... yes
creating Makefile
current directory: /var/lib/gems/2.5.0/gems/sqlite3-1.4.3/ext/sqlite3
make "DESTDIR=" clean
current directory: /var/lib/gems/2.5.0/gems/sqlite3-1.4.3/ext/sqlite3
make "DESTDIR="
compiling aggregator.c
compiling backup.c
compiling database.c
database.c: In function ‘rb_sqlite3_disable_quirk_mode’:
database.c:[8](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:9)4:1: error: expected ‘;’ before ‘}’ token
 }
 ^
database.c: In function ‘exec_batch’:
database.c:748:57: warning: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type [-Wincompatible-pointer-types]
     status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
                                                         ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./sqlite3_ruby.h:25:0,
                 from database.c:1:
/usr/include/sqlite3.h:403:[16](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:17): note: expected ‘int (*)(void *, int,  char **, char **)’ but argument is of type ‘int (*)(VALUE,  int,  char **, char **) {aka int (*)(long unsigned int,  int,  char **, char **)}’
 SQLITE_API int sqlite3_exec(
                ^~~~~~~~~~~~
database.c:748:81: warning: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast [-Wint-conversion]
     status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
                                                                                 ^~~~~~~~~~~~
In file included from ./sqlite3_ruby.h:25:0,
                 from database.c:1:
/usr/include/sqlite3.h:403:16: note: expected ‘void *’ but argument is of type ‘VALUE {aka long unsigned int}’
 SQLITE_API int sqlite3_exec(
                ^~~~~~~~~~~~
database.c:750:57: warning: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type [-Wincompatible-pointer-types]
     status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./sqlite3_ruby.h:25:0,
                 from database.c:1:
/usr/include/sqlite3.h:403:16: note: expected ‘int (*)(void *, int,  char **, char **)’ but argument is of type ‘int (*)(VALUE,  int,  char **, char **) {aka int (*)(long unsigned int,  int,  char **, char **)}’
 SQLITE_API int sqlite3_exec(
                ^~~~~~~~~~~~
database.c:750:84: warning: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast [-Wint-conversion]
     status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
                                                                                    ^~~~~~~~~~~~
In file included from ./sqlite3_ruby.h:25:0,
                 from database.c:1:
/usr/include/sqlite3.h:403:16: note: expected ‘void *’ but argument is of type ‘VALUE {aka long unsigned int}’
 SQLITE_API int sqlite3_exec(
                ^~~~~~~~~~~~
Makefile:[24](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:25)2: recipe for target 'database.o' failed
make: *** [database.o] Error 1
make failed, exit code 2
Gem files will remain installed in /var/lib/gems/2.5.0/gems/sqlite3-1.4.3 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_[64](https://github.com/xxx/yyy/runs/9999999999?check_suite_focus=true#step:5:65)-linux/2.5.0/sqlite3-1.4.3/gem_make.out
Error: Process completed with exit code 1.

I tried different fixes posted around without success so far. Any ideas?

sj26 commented 2 years ago

Sounds like you have an issue installing the sqlite3 gem. Have you tried doing that alone?

gem install sqlite3 -v 1.4.3

Please reopen with more details if you're still having trouble.