Gem Install failing: extconf.rb not pulling install.sh
During installation, the gem attempts to download install.sh from uwsgi.it/install, but the response body says the file has been moved permanently.
Redirecting extconf.rb to pull the file from github allows the install to complete as normal.
It is probably also worth noting that when running the master branch copy of extconf.rb, the response of the http request was a 404...
This is still a problem after the 2.0.18 release.
Still broken Error in the logs ends up looking like:
/var/lib/gems/2.5.0/gems/uwsgi-2.0.19/bin/uwsgi:4:in `exec': No such file or directory - /var/lib/gems/2.5.0/gems/uwsgi-2.0.19/ext/uwsgi/uwsgi.ruby
'cause it couldn't build that file, since it couldn't find the install script.
I "fixed" this for my purposes by unpacking the gem and making the following changes:
--- ./uwsgi-2.0.19/ext/uwsgi/extconf.rb 2023-08-16 16:03:05.404760188 -0400
+++ ./uwsgi-2.0.19-PATCHED/ext/uwsgi/extconf.rb 2023-08-16 16:09:04.183706439 -0400
@@ -1,10 +1,10 @@
require 'net/http'
+require 'uri'
-Net::HTTP.start("uwsgi.it") do |http|
- resp = http.get("/install")
- open("install.sh", "wb") do |file|
- file.write(resp.body)
- end
+uri = URI.parse("https://raw.githubusercontent.com/unbit/uwsgi/master/install.sh")
+resp= Net::HTTP.get_response(uri)
+open("install.sh", "wb") do |file|
+ file.write(resp.body)
end
major,minor = RUBY_VERSION.split('.')
then repacking it and just using that instead