libgcc_s.so.1: cannot open shared object file: No such file or directory

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Bitbucket Server does not start and the following appears in the atlassian-bitbucket.log:

2012-11-14 15:14:51,328 ERROR [main]  o.s.web.context.ContextLoader Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'authenticationProvider' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationProvider' defined in URL [jar:file:/opt/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-1.3.1.jar!/com.atlassian.bitbucket/internal/user/AuthenticationProviderImpl.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.bitbucket.user.UserService]: : Error creating bean with name 'userService' defined in URL [jar:file:/opt/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-1.3.1.jar!/com.atlassian.bitbucket/internal/user/UserServiceImpl.class]: Unsatisfied dependency expressed through constructor argument with index 5 of type [com.octo.captcha.service.CaptchaService]: : Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userService' defined in URL [jar:file:/opt/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-1.3.1.jar!/com.atlassian.bitbucket/internal/user/UserServiceImpl.class]: Unsatisfied dependency expressed through constructor argument with index 5 of type [com.octo.captcha.service.CaptchaService]: : Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory
...
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationProvider' defined in URL [jar:file:/opt/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-1.3.1.jar!/com.atlassian.bitbucket/internal/user/AuthenticationProviderImpl.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.bitbucket.user.UserService]: : Error creating bean with name 'userService' defined in URL [jar:file:/opt/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-1.3.1.jar!/com.atlassian.bitbucket/internal/user/UserServiceImpl.class]: Unsatisfied dependency expressed through constructor argument with index 5 of type [com.octo.captcha.service.CaptchaService]: : Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userService' defined in URL [jar:file:/opt/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-1.3.1.jar!/com.atlassian.bitbucket/internal/user/UserServiceImpl.class]: Unsatisfied dependency expressed through constructor argument with index 5 of type [com.octo.captcha.service.CaptchaService]: : Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageCaptchaService' defined in class path resource [bitbucket-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory
...
Caused by: java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_09/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory

Cause

Bitbucket Server is complaining about a library dependency, libgcc_s.so.1

Resolution

Install the libgcc_s.so.1 package and after that, try to start Bitbucket Server again:

For RedHat (or similar distributions):

yum install gcc

For Debian (or similar distributions):

apt install gcc

Last modified on Apr 12, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.