title: linux ModuleNotFoundError: No module named '_ctypes
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[root@ONEVPS190105040754 ~]# youtube-dl -V
  Traceback (most recent call last):
    File "/usr/local/python3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/local/python3/lib/python3.7/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/usr/local/bin/youtube-dl/__main__.py", line 16, in &lt;module&gt;
    File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 15, in &lt;module&gt;
    File "/usr/local/bin/youtube-dl/youtube_dl/options.py", line 8, in &lt;module&gt;
    File "/usr/local/bin/youtube-dl/youtube_dl/downloader/__init__.py", line 3, in &lt;module&gt;
    File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 9, in &lt;module&gt;
    File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 7, in &lt;module&gt;
    File "/usr/local/python3/lib/python3.7/ctypes/__init__.py", line 7, in &lt;module&gt;
      from _ctypes import Union, Structure, Array
  ModuleNotFoundError: No module named '_ctypes'
  [root@ONEVPS190105040754 ~]# yum  install libffi-dev
  Loaded plugins: changelog, fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.metrocast.net
   * extras: mirrors.maine.edu
   * updates: mirrors.advancedhosters.com
  No package libffi-dev available.
  Error: Nothing to do</code></pre>
  </div>
  </div>
  </p>
  
  <p>I was going to use youtube-dl, but told me "ModuleNotFoundError: No module named '_ctypes'". I found some methods on the Internet, such as "yum install libffi-dev", but they still didn't work</p>
  
  <p>Centos7 </p>