Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

A “OSError: [Errno 22] Invalid argument”occurred while installing pip #399

Open
wax8280 opened this issue Dec 8, 2020 · 0 comments
Open

Comments

@wax8280
Copy link

wax8280 commented Dec 8, 2020

Veil version

3.1.14

OS Used - all info (architecture, linux flavor, etc)

Kali 2020.1

How did you install Veil? (Apt, Clone from Github, etc.)

apt -y install veil
/usr/share/veil/config/setup.sh --force --silent

Did you run the setup script?

Yes

Pastebin link to error you are encountering (include console actions you took prior to error)

When I ran the installation, I encountered an error about installing pip.

Traceback (most recent call last):                                                                                                                           
  File "C:\Python34\lib\site-packages\pip\basecommand.py", line 211, in main                                                                                 
    status = self.run(options, args)                                                                                                                         
  File "C:\Python34\lib\site-packages\pip\commands\install.py", line 294, in run                                                                             
    requirement_set.prepare_files(finder)                                                                                                                    
  File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 334, in prepare_files                                                                        
    functools.partial(self._prepare_file, finder))                                                                                                           
  File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 321, in _walk_req_to_install                                                                 
    more_reqs = handler(req_to_install)                                                                                                                      
  File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 491, in _prepare_file                                                                        
    session=self.session)                                                                                                                                    
  File "C:\Python34\lib\site-packages\pip\download.py", line 825, in unpack_url                                                                              
    session,                                                                                                                                                 
  File "C:\Python34\lib\site-packages\pip\download.py", line 673, in unpack_http_url                                                                         
    from_path, content_type = _download_http_url(link, session, temp_dir)                                                                                    
  File "C:\Python34\lib\site-packages\pip\download.py", line 886, in _download_http_url                                                                      
    _download_url(resp, link, content_file)                                                                                                                  
  File "C:\Python34\lib\site-packages\pip\download.py", line 621, in _download_url                                                                           
    for chunk in progress_indicator(resp_read(4096), 4096):                                                                                                  
  File "C:\Python34\lib\site-packages\pip\utils\ui.py", line 135, in iter                                                                                    
    self.next(n)                                                                                                                                             
  File "C:\Python34\lib\site-packages\pip\_vendor\progress\__init__.py", line 73, in next                                                                    
    self.update()                                                                                                                                            
  File "C:\Python34\lib\site-packages\pip\_vendor\progress\bar.py", line 82, in update                                                                       
    self.writeln(line)                                                                                                                                       
  File "C:\Python34\lib\site-packages\pip\_vendor\progress\helpers.py", line 69, in writeln                                                                  
    print(line, end='', file=self.file)                                                                                                                      
  File "C:\Python34\lib\site-packages\pip\_vendor\colorama\ansitowin32.py", line 136, in write                                                               
    self.wrapped.flush()                                                                                                                                     
OSError: [Errno 22] Invalid argument     

I locate it in the setup.sh file. I found that when setup.sh runs to lines 569 to 593, an error occurs.

  ## Use wine based pip to install dependencies
  echo -e "\n\n [*] ${YELLOW}Installing (Wine) Python's PIP pefile${RESET}\n"
  sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "--upgrade" "pip==19.1.*"
  tmp="$?"
  if [[ "${tmp}" -ne "0" ]]; then
    msg="Failed to run (wine) Python pip... Exit code: ${tmp}"
    errors="${errors}\n${msg}"
    echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
  fi

  sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "future"
  tmp="$?"
  if [[ "${tmp}" -ne "0" ]]; then
    msg="Failed to run (wine) Python pip future... Exit code: ${tmp}"
    errors="${errors}\n${msg}"
    echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
  fi

  sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "pefile"
  tmp="$?"
  if [[ "${tmp}" -ne "0" ]]; then
    msg="Failed to run (wine) Python pip pefile... Exit code: ${tmp}"
    errors="${errors}\n${msg}"
    echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
  fi

I tried to run this three commands manually, but also failed.

Expected behavior

Any additional info you want to tell me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant