2014-03-31 3 views
1

ruby ​​mysql gem을 설치하려고합니다. mysql gem/ruby-dev를 설치할 수 없습니다.

Building native extensions. This could take a while... 
ERROR: Error installing mysql: 
ERROR: Failed to build gem native extension. 

    /usr/bin/ruby1.9.1 extconf.rb 
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) 
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
from extconf.rb:5:in `<main>' 


Gem files will remain installed in /var/lib/gems/1.9.1/gems/mysql-2.9.1 for inspection. 
Results logged to /var/lib/gems/1.9.1/gems/mysql-2.9.1/ext/mysql_api/gem_make.out 

내가 ruby-dev를 설치 추천 this answer을 찾았지만, 하나 apt-get install ruby1.9.1-dev 또는 apt-get install ruby-dev 후 내가 얻을 : gem install mysql 후 내가 얻을
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
Some packages could not be installed. This may mean that you have 
requested an impossible situation or if you are using the unstable 
distribution that some required packages have not yet been created 
or been moved out of Incoming. 
The following information may help to resolve the situation: 

The following packages have unmet dependencies: 
ruby1.9.1-dev : Depends: libruby1.9.1 (= 1.9.3.194-8.1ubuntu2) but 1.9.3.194-8.1ubuntu2.1 is to be installed 
       Recommends: ruby1.9.1 (= 1.9.3.194-8.1ubuntu2) but 1.9.3.194-8.1ubuntu2.1 is to be installed 
E: Unable to correct problems, you have held broken packages. 

1) 어떻게이 문제를 해결할 수

?

2) 더 흥미롭게도 : 문제는 새로운 xubuntu 설치에서 발생하므로이 유형의 오류는 무엇이 발생합니까? 무의식적으로 무언가를 깨뜨릴 수 있었습니까? 우분투 패키지 관리자의 방식과 리눅스에서의 의존성을 이해하는 데 도움이되는 자료에 대한 링크를 제공해 주시면 감사하겠습니다.

+0

빌드 에센셜을 설치하셨습니까? – AndreDurao

+0

예, 빌드에 필수 패키지가 설치되었습니다. –

+0

나는 같은 상황이다. 어떤 방법으로 해결 했습니까? – ilpaijin

답변

0

나는 우분투 14.04에서 같은 문제를 만난다. 나는 모든 루비, 루비 -1.9, 루비 개발자 패키지를 제거하고 루비와 루비 개발자를 다시 설치한다. 지금은 보석으로 루비 소프트웨어를 설치할 수있는 것 같습니다.