How to uninstall/install youtube-dl by using terminal
Solution 1
I solve the problem by using these commands:
sudo apt-get remove youtube-dl
After that:
sudo apt-get install youtube-dl
Downloading play-list...
youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
Done.
Solution 2
Try pip
command to upgrade youtube-dl
sudo pip install --upgrade youtube-dl
If you get this message:
sudo: pip: command not found
Then first install pip
:
sudo apt-get install python-setuptools
sudo easy_install pip
sudo pip install --upgrade youtube-dl
Solution 3
It would be easier to use --reinstall
sudo apt-get install --reinstall youtube-dl
then use it:
youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
Solution 4
Why you don't use the recommended official way to install youtube-dl? Very useful since very often you will need to update it (sudo youtube-dl -U
) to bleeding edge stable version to keep it working:
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
And here you'll find a bash script I made for batch downloading getting track names from a text file.
Related videos on Youtube
Atom
Updated on September 18, 2022Comments
-
Atom over 1 year
I am fairly new to PHP, and I have started working on a small project. I want my code to be organized, so I decided to include the file container.phtml in my index.php file. So when $page = 'login' it would include the login.css and login.phtml file. I want login.css to apply to login.phtml. Instead when I run the program login.css does not load or produce any error messages in the console. Does the login.css file only apply to container.phtml? What can I do differently while maintaining the way I want this to work?
EDIT: The $page variable tells index.php what file it should include. Example: $page = 'login'; That tell it to get the login.phtml file. Then, in container.phtml it will check to see if $page = 'login' and then will include login.css
index.php
<?php if(!isset($_GET['page'])){ $page = 'home'; }else{ $page = $_GET['page']; } /* Fetch needed files. */ require_once 'app/paths.php'; require_once THEME_LAYOUT_PATH . 'container.phtml'; $pages = array( 'home', 'login', 'register' ); $layoutPath = 'themes/neutron/layout/' . $page . '/' . $page . '.phtml'; if(in_array($page, $pages)){ require $layoutPath; }else{ require 'themes/neutron/layout/404/404.phtml'; } ?>
container.phtml
<html> <title>Neutron</title> <link rel = "stylesheet" type = "text/css" href = "<?php ASSETS_PATH . 'css/bootstrap.min.css' ?>"> <link rel = "stylesheet" type = "text/css" href = "<?php ASSETS_PATH . 'js/bootstrap.min.js' ?>"> <link rel = "stylesheet" type = "text/css" href = "<?php ASSETS_PATH . 'js/jquery.min.js' ?>"> <?php /* Include header, footer, etc */ require_once THEME_LAYOUT_PATH . 'partials/header.php'; require_once THEME_LAYOUT_PATH . 'partials/footer.php'; ?> <?php if($page == 'login'){ ?> <link rel = "stylesheet" type = "text/css" href = "<?php ASSETS_PATH . 'css/login.css' ?>"> <?php } ?> </html>
login.phtml
<div class="login-clean" style="background-color: rgb(255,255,255);"> <form method="post"> <h2 class="sr-only">Login Form</h2> <div class="illustration"><i class="icon ion-ios-navigate" style="color: #4777f4;"></i></div> <div class="form-group"><input class="border rounded form-control" type="email" name="email" placeholder="Username"></div> <div class="form-group"><input class="border rounded form-control" type="password" name="password" placeholder="Password"></div> <div class="form-group"><button class="btn btn-primary btn-block border rounded" type="submit" style="background-color: #4777f4;">Log In</button></div><a class="forgot" href="#">Forgot Password?</a></form> </div>
-
Wilf almost 9 yearsFirst fix the error you are encountering using this post. What version of youtube-dl are you currently using (you can use
youtube-dl --version
for that)? -
Madhav Nikam almost 9 years@Wilf thanks it working with no errors. I try below commands sudo rm /var/lib/apt/lists/* -vf sudo apt-get update what should do next?
-
Madhav Nikam almost 9 yearserror occur al last W: Failed to fetch in.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/… Hash Sum mismatch
-
Madhav Nikam almost 9 yearsW: Failed to fetch in.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/i18n/… Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead.
-
Wilf almost 9 yearsYou can use the edit button to add information to your question.... are you connected to the internet via a proxy?
/var/lib/apt/lists/
should be empty after running the first command -
Madhav Nikam almost 9 years@Wilf am not use proxy. And i am not understand what should i edit on my question can you help me or suggest actual edit.
-
Wilf almost 9 yearsYou can edit in the output you put in the comments, because its difficult to read in the comments :)
-
Madhav Nikam almost 9 yearsLet us continue this discussion in chat.
-
Madhav Nikam almost 9 years@Wilf I try to edit comments but i am unable now.Edit option is disable now, may older comment. Sorry for that. But i remember you suggestion for next time. Thank You.
-
-
Maythux almost 9 yearsSo why the downvote?
-
Atom almost 4 yearsI am not sure what you are trying to tell me here. The $page variable tells index.php what file it should include. Example: $page = 'login'; That tell it to get the login.phtml file. Then, in container.phtml it will check to see if $page = 'login' and then will include login.css.
-
Atom almost 4 yearsHere are the paths I have defined: define('ASSETS_PATH', THEME_PATH . 'assets/'); The problem isnt ASSETS_PATH and Im pretty sure it wasn't in the first place. So the CSS that was included in container.phtml, will apply to login.phtml based on my code? It did not work for me.
-
Fred almost 4 yearscan you post here to content of the console errors you mentioned?
-
Fred almost 4 yearsPS. You should put $layoutPath = 'themes/neutron/layout/' . $page . '/' . $page . '.phtml'; in the if (in_array()) to avoid warnings
-
Atom almost 4 yearsI did not get any console errors, yet no styles took effect in login.phtml
-
Fred almost 4 yearsseems to me like a path/url problem can you print the results of THEME_PATH
-
Gabriel Rogath over 2 yearsUpdate 2022: use this
sudo apt-get install python3-pip
not thissudo easy_install pip