[16.1] `GLIBC_2.18' not found
[16.1] `GLIBC_2.18' not found
Issue: Cant run factorio. Redownloaded five times.
Machine is AWS EC2 Amazon. Works fine with .15 version
x64]$ factorio
-bash: factorio: command not found
x64]$ ldd factorio
./factorio: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./fact orio)
linux-vdso.so.1 => (0x00007ffd169f3000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f30cdf4b000)
librt.so.1 => /lib64/librt.so.1 (0x00007f30cdd43000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f30cdb3f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f30cd83d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f30cd479000)
/lib64/ld-linux-x86-64.so.2 (0x00007f30ce167000)
Machine is AWS EC2 Amazon. Works fine with .15 version
x64]$ factorio
-bash: factorio: command not found
x64]$ ldd factorio
./factorio: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./fact orio)
linux-vdso.so.1 => (0x00007ffd169f3000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f30cdf4b000)
librt.so.1 => /lib64/librt.so.1 (0x00007f30cdd43000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f30cdb3f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f30cd83d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f30cd479000)
/lib64/ld-linux-x86-64.so.2 (0x00007f30ce167000)
Last edited by Cobaia on Wed Dec 13, 2017 9:24 pm, edited 1 time in total.
Re: [16.1] `GLIBC_2.18' not found
You need glibc version 2.18 or newer, which you apparently don't have. That is not a bug, but an outdated system.
-
- Inserter
- Posts: 30
- Joined: Fri May 06, 2016 2:01 pm
- Contact:
Re: [16.1] `GLIBC_2.18' not found
Yes, it is caused by factorio requiring a newer library, not a bug, but glibc 2.17 is the version supported by RHEL 7.4 (released in august) and all the related distros. If the upgrade was necessary because of bugs or features in the library that is one thing, but it does kill off the ease of running factorio on a wide range of common linux distributions.
Re: [16.1] `GLIBC_2.18' not found
RHEL is notorious for shipping ancient software. glibc 2.18 was released in 2013, there is no reason why it shouldn't be available everywhere by now. RHEL users will simply have to upgrade to a distro that ships non-ancient software. Even Debian Jessie (oldstable) ships with glibc 2.19.GodricSeer wrote:Yes, it is caused by factorio requiring a newer library, not a bug, but glibc 2.17 is the version supported by RHEL 7.4 (released in august) and all the related distros. If the upgrade was necessary because of bugs or features in the library that is one thing, but it does kill off the ease of running factorio on a wide range of common linux distributions.
What happened is we essentially bumped up the minimum required Ubuntu version from 12.04 (which is EOL now) to 14.04. Since Ubuntu is what most people use, that is good enough as a minimum requirement for us.
- distortions864
- Fast Inserter
- Posts: 124
- Joined: Thu Apr 20, 2017 12:56 am
- Contact:
Re: [16.1] `GLIBC_2.18' not found
RHEL and derivatives is %24.5 of linux servers.
Are there any features from the newer glibc, you are actually using or need?
If there aren't, you can still compile against the older version. People with the newer glibc, will still have the improvements of the newer glibc (if they have it).
Linux distro server share:
https://w3techs.com/technologies/detail ... ux/all/all
glibc changelog:
https://abi-laboratory.pro/tracker/chan ... 8/log.html
Are there any features from the newer glibc, you are actually using or need?
If there aren't, you can still compile against the older version. People with the newer glibc, will still have the improvements of the newer glibc (if they have it).
Linux distro server share:
https://w3techs.com/technologies/detail ... ux/all/all
glibc changelog:
https://abi-laboratory.pro/tracker/chan ... 8/log.html
M45 Science: A Factorio Community since 2017! https://m45sci.xyz/
Re: [16.1] `GLIBC_2.18' not found
(I am disappointed with abandoning RHEL/Centos, but it's their game).
Edit 7 - CentOS7 glibc 2.18 factorio headless.
Edit 8 - typo fix. Removing exports per GodricSeer suggestion. Thanks!
Edit 9 - mention of executable-path
Edit 10 - 20190227 - Factorio 0.17.1 is out! Verified the same glibc 2.18 method is still valid.
Edit 11 - 20190926 - Centos8 Released yesterday! glibc 2.28! We are saved! A test install with Factorio 0.17.69 starts up just fine with a stock install. Hooray!
I initially posted this with quick instructions on replacing the CentOS7 glibc with 2.18 - which is a very bad idea. I'll leave those instructions at the bottom, but they really shouldn't be used. After seeing that it was possible to get factorio 0.16.x working on centos7 with the wrong approach (replacing glibc), I started working on the right approach (side by side)
Side by Side glibc 2.18
Updated instructions for adding a side-by-side glibc 2.18 into /opt for you to use starting the factorio headless server on CentOS7/RHEL7:
Get your tools ready
Now that you have your steel axe, layout the belts and get your materials.
Fix test script
fix line 179 of the test install script:
I like nano, use whatever text editor you like.
- change
- to
Assemble!
At this point, you have glibc 2.18 in the /opt/glibc-2.18 path without getting in the way of the system glibc.
Now you have to login as your factorio user and change your startup to use the new glibc.
Specify the ld-linux-x86.so.2 in the /opt structure to be used when you start factorio and give it an appropriate path and LD_LIBRARY_PATH to use.
Creating a blank map (modify the path to your factorio binary appropriately):
Running the latest save (I had trouble with this on one of my pre-0.16 maps - I converted it from a local save and uploaded the updated version and it worked fine)
Looks good to me!
Note: Factorio will not auto-restart with this startup method if you are changing mods or auto-updating
Edit 20180209 - There was a recent thread where this format was used for startup and it looks a little prettier:
---------
The Wrong Way
And here is the wrong way that just replaced the default glibc:
The following is a bad idea. Replacing glibc in /usr works at the moment, but will likely be broken or will break future OS updates (and will almost certainly break other things on the system that expects the older glibc; but if your system is *just* for factorio . . .). I would say 'use at your own risk', but there really isn't much risk here - this will eventually break things on your system. There's probably a nice side-by-side way of doing this that someone could improve on.
Replacing glibc 2.17 with 2.18 (this is going to break things eventually!)
Get your tools ready
Now that you have your steel axe, layout the belts and get your materials.
Fix rotation
fix line 179 of the test install script:
I like nano, use whatever text editor you like.
- change
- to
Assemble!
Hooray!
Edit 7 - CentOS7 glibc 2.18 factorio headless.
Edit 8 - typo fix. Removing exports per GodricSeer suggestion. Thanks!
Edit 9 - mention of executable-path
Edit 10 - 20190227 - Factorio 0.17.1 is out! Verified the same glibc 2.18 method is still valid.
Edit 11 - 20190926 - Centos8 Released yesterday! glibc 2.28! We are saved! A test install with Factorio 0.17.69 starts up just fine with a stock install. Hooray!
I initially posted this with quick instructions on replacing the CentOS7 glibc with 2.18 - which is a very bad idea. I'll leave those instructions at the bottom, but they really shouldn't be used. After seeing that it was possible to get factorio 0.16.x working on centos7 with the wrong approach (replacing glibc), I started working on the right approach (side by side)
Side by Side glibc 2.18
Updated instructions for adding a side-by-side glibc 2.18 into /opt for you to use starting the factorio headless server on CentOS7/RHEL7:
Get your tools ready
Code: Select all
yum groupinstall "Development tools"
yum install glibc-devel.i686 glibc.i686
Code: Select all
cd /tmp
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar xvzf glibc-2.18.tar.gz
cd glibc-2.18
mkdir glibc-build
cd glibc-build
../configure --prefix='/opt/glibc-2.18'
fix line 179 of the test install script:
I like nano, use whatever text editor you like.
Code: Select all
nano +179 ../scripts/test-installation.pl
Code: Select all
if (/$ld_so_name/) {
Code: Select all
if (/\Q$ld_so_name\E/) {
Assemble!
Code: Select all
make
make install
Now you have to login as your factorio user and change your startup to use the new glibc.
Specify the ld-linux-x86.so.2 in the /opt structure to be used when you start factorio and give it an appropriate path and LD_LIBRARY_PATH to use.
Creating a blank map (modify the path to your factorio binary appropriately):
Code: Select all
PATH=/opt/glibc-2.18/bin:$PATH LD_LIBRARY_PATH=/opt/glibc-2.18/lib:/usr/lib64 /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 /home/factorio/factorio/bin/x64/factorio --create /home/factorio/factorio/saves/newmap16.zip
Code: Select all
PATH=/opt/glibc-2.18/bin:$PATH LD_LIBRARY_PATH=/opt/glibc-2.18/lib:/usr/lib64 /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 /home/factorio/factorio/bin/x64/factorio --start-server-load-latest
Code: Select all
[factorio@factorio ~]$ PATH=/opt/glibc-2.18/bin:$PATH LD_LIBRARY_PATH=/opt/glibc-2.18/lib:/usr/lib64 /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 /home/factorio/factorio/bin/x64/factorio --start-server-load-latest
0.000 2017-12-18 15:11:49; Factorio 0.16.6 (build 34439, linux64, headless)
0.000 Operating system: Linux
0.000 Program arguments: "/home/factorio/factorio/bin/x64/factorio" "--start-server-load-latest"
0.000 Read data path: /home/factorio/factorio/data
0.000 Write data path: /home/factorio/factorio [110368/113336MB]
0.000 Binaries path: /home/factorio/factorio/bin
0.005 System info: [CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz, 8 cores, RAM: 15804MB]
0.005 Running in headless mode
...
Edit 20180209 - There was a recent thread where this format was used for startup and it looks a little prettier:
Code: Select all
/opt/glibc-2.18/lib/ld-2.18.so --library-path /opt/glibc-2.18/lib ./bin/x64/factorio --create test.zip --executable-path ./bin/x64/factorio
---------
The Wrong Way
And here is the wrong way that just replaced the default glibc:
The following is a bad idea. Replacing glibc in /usr works at the moment, but will likely be broken or will break future OS updates (and will almost certainly break other things on the system that expects the older glibc; but if your system is *just* for factorio . . .). I would say 'use at your own risk', but there really isn't much risk here - this will eventually break things on your system. There's probably a nice side-by-side way of doing this that someone could improve on.
Replacing glibc 2.17 with 2.18 (this is going to break things eventually!)
Get your tools ready
Code: Select all
yum groupinstall "Development tools"
yum install glibc-devel.i686 glibc.i686
Code: Select all
cd /tmp
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar xvzf glibc-2.18.tar.gz
cd glibc-2.18
mkdir glibc-build
cd glibc-build
../configure --prefix='/usr'
Fix rotation
fix line 179 of the test install script:
I like nano, use whatever text editor you like.
Code: Select all
nano +179 ../scripts/test-installation.pl
Code: Select all
if (/$ld_so_name/) {
Code: Select all
if (/\Q$ld_so_name\E/) {
Assemble!
Code: Select all
make
make install
Code: Select all
[factorio@factorio ~]$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[factorio@factorio ~]$ /home/factorio/factorio/bin/x64/factorio --start-server-load-latest
0.000 2017-12-17 17:11:58; Factorio 0.16.5 (build 34419, linux64, headless)
0.000 Operating system: Linux
0.000 Program arguments: "/home/factorio/factorio/bin/x64/factorio" "--start-server-load-latest"
0.000 Read data path: /home/factorio/factorio/data
0.000 Write data path: /home/factorio/factorio [110456/113336MB]
0.000 Binaries path: /home/factorio/factorio/bin
0.005 System info: [CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz, 8 cores, RAM: 15804MB]
0.005 Running in headless mode
Last edited by millisa on Thu Sep 26, 2019 6:00 am, edited 6 times in total.
Re: [16.1] `GLIBC_2.18' not found
You sir, are a hero.
I recovered my account credentials created in Mar. 2016 so that I could thank you.
It would have been a tough decision between choosing to run something besides CentOS or RHEL, or not playing factorio.
Thanks.
I recovered my account credentials created in Mar. 2016 so that I could thank you.
It would have been a tough decision between choosing to run something besides CentOS or RHEL, or not playing factorio.
Thanks.
-
- Inserter
- Posts: 30
- Joined: Fri May 06, 2016 2:01 pm
- Contact:
Re: [16.1] `GLIBC_2.18' not found
I will add another reponse here and say that millisa's process for a side-by-side install of v2.18 works. THere are a couple changes I would recommend.
First, configure with
so that the library is contained in its own subdirectory. I think this is just a typo, since later instructions seem to assume this is the case.
Also, I recommend not exporting the changes to PATH and LD_LIBRARY_PATH, as they do break utilities. Instead you can run only factorio with those changes:
I simply made a bash script with that line in it, and run it to start factorio. This keeps the rest of the console working as intended. Note I also had to add /usr/lib64 to my LD_LIBRARY_PATH so that it could find libasound.so.0.2 (?). Try without that addition first, to see if it works, if not add it. Also, factorio won't restart automatically this way, if you change mods or use the auto-updater.
First, configure with
Code: Select all
../configure --prefix='/opt/glibc-2.18'
Also, I recommend not exporting the changes to PATH and LD_LIBRARY_PATH, as they do break utilities. Instead you can run only factorio with those changes:
Code: Select all
PATH=/opt/glibc-2.18/bin:$PATH LD_LIBRARY_PATH=/opt/glibc-2.18/lib:/usr/lib64 /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 ~/games/factorio/bin/x64/factorio
Re: [16.1] `GLIBC_2.18' not found
Thanks!
Fixed the typo, took the suggestion to drop the exports from the 'side by side' method and put it in line. Added the note about auto-updater (I do mine by hand, so it didn't occur to me).
Fixed the typo, took the suggestion to drop the exports from the 'side by side' method and put it in line. Added the note about auto-updater (I do mine by hand, so it didn't occur to me).
Re: [16.1] `GLIBC_2.18' not found
You sir|madame are indeed a hero, thnx!
(needed this to get my development environment up and running after lying dormant for a year or so, yum upgrade didn't do the trick sadly )
(needed this to get my development environment up and running after lying dormant for a year or so, yum upgrade didn't do the trick sadly )
Hosting a factorio server? Take a look at this || init script ||.
Re: [16.1] `GLIBC_2.18' not found
There is a reason RHEL ships with "ancient" libraries: stability above all else. That they keep glibc at version 2.17 does not mean it is unmaintained or bugged. Bugs still get fixed for the lifetime of the distribution and in many cases fixed get backported from newer versions to 2.17. What you see in this distribution as glibc 2.17 today was probably not the glibc that was released way back when. The reason myself and many other people run on RHEL/CentOS is it's stable. It doesn't crash, and upgrades never break anything.Oxyd wrote:RHEL is notorious for shipping ancient software. glibc 2.18 was released in 2013, there is no reason why it shouldn't be available everywhere by now. RHEL users will simply have to upgrade to a distro that ships non-ancient software. Even Debian Jessie (oldstable) ships with glibc 2.19.GodricSeer wrote:Yes, it is caused by factorio requiring a newer library, not a bug, but glibc 2.17 is the version supported by RHEL 7.4 (released in august) and all the related distros. If the upgrade was necessary because of bugs or features in the library that is one thing, but it does kill off the ease of running factorio on a wide range of common linux distributions.
What happened is we essentially bumped up the minimum required Ubuntu version from 12.04 (which is EOL now) to 14.04. Since Ubuntu is what most people use, that is good enough as a minimum requirement for us.
I do not want to start any distro wars. Ubuntu/debian have their place in the world, and so do CentOS/RHEL. I feel you shouldn't be calling a distribution with as large a market share as RHEL and its derivatives (that is still being maintained and will be for a long time) outdated, and putting the burden of "upgrading to a distro that ships non-ancient software" on your customers. Assuming there are no technical reasons that prevent you from compiling against glibc-2.17, can you please maintain a build that runs on CentOS 7?
If this is still not an option for you, would you consider maintaining a docker container for factorio instead?
Re: [16.1] `GLIBC_2.18' not found
How can I run that command in background e.g with screen?
Okay I got it. Just ran screen command alone and then typed magic command. Nice guide you wrote there good job thanks.
Okay I got it. Just ran screen command alone and then typed magic command. Nice guide you wrote there good job thanks.
- Trashman992
- Burner Inserter
- Posts: 9
- Joined: Sun Jan 29, 2017 1:54 am
- Contact:
Re: [16.1] `GLIBC_2.18' not found
Thankyou millisa and friends!
This still works with everything download fresh today. Lovely write-up, very easy to follow.
Super happy!
This still works with everything download fresh today. Lovely write-up, very easy to follow.
Super happy!
- Trashman992
- Burner Inserter
- Posts: 9
- Joined: Sun Jan 29, 2017 1:54 am
- Contact:
Re: [16.1] `GLIBC_2.18' not found
Um. Any suggestions to get this script from the wiki working with the commands above? I can't figure it out.
https://github.com/Bisa/factorio-init
https://github.com/Bisa/factorio-init
Re: [16.1] `GLIBC_2.18' not found
Bisa accepted my PR that adds the alternative glibc root options to the script Trashman992 so if you grab a new copy you should be able to edit the config and have it running buttery smooth